Error when compiling MED while installing on a remote cluster

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Dear developers,

Please could you help me with this problem:

I have been using Code_Saturne on my local PC for about one year, the progress is good, thanks to the great support from Yvan. Now I am trying to use a remote cluster, for some big cases. But I met a problem when installing on the cluster (based on Centos7).

The installation was in my self-built environment, and I used Anaconda to install the pre-requisites.
I was trying to install the latest source codes from GitHub, use the semi-automatic installation method, which always succeeds on my local Ubuntu PC. But on the remote cluster, one error occurred when compiling MED, while the previous HDF5 and CGNS seem ok:
error.png
The install_saturne.log file showed:
"...
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
..."
error_details.png
Could you please guide me on how to figure out this problem?

Many thanks,
Ruonan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Please find the setup_ini, setup and install_saturne.log files. Thank you very much!

Best regards,
Ruonan
Attachments
setup_ini.txt
(3.98 KiB) Downloaded 127 times
setup.txt
(4.28 KiB) Downloaded 115 times
install_saturne.log
(1.87 MiB) Downloaded 121 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when compiling MED while installing on a remote cluster

Post by Yvan Fournier »

Hello,

The "/usr/bin/ld: .libs/MEDiterators.o: unrecognized relocation (0x29) in section `.text.MEDgetEntityGeometryTypeIt'"
error you encounter is not some erro I have seen before...

Could you try:

Code: Select all

cd /users/rw00793/code_saturne-build/med-4.1.0.build
make clean
make
and post the output ? (if there is no error on this second try, simply also run "make install", and change the code_saturne installer setup to use this install for MED instead of reinstalling it (i.e. install=no path=<path>)

If it fails the same way, could you also post the config.log and Makefile in that same directory ?

Note that in general I have a bad feedback with Conda (I have never used it myself, but you are not the first user installing code_saturne with conda who encounters strange issues, usually due to a strange soup of environment variables).

Best regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Hello Yvan,

Thank you so much. Following your kind suggestion, I ran "make clean" and then "make" in the med-4.1.0.build folder. Unfortunately, the same error appeared. Please find the config.log and Makefile attached.
The same error.png
Thanks Yvan, I also found some conda issues in this forum. This is the first time I use Anaconda. Since I need to install some python related softwares, for example pyqt5, the IT supporter from the university cluster suggested, it's better to use Anaconda. Please could I ask if you have some suggestions or experience, is there a better choice than using conda?

(On my local Ubuntu PC, I use Synaptic Package Manager to install the pre-requisites, then the installation will run smoothly. But I'm not familiar with the Centos7 remote cluster.)

Many thanks,
Ruonan
Attachments
Makefile.txt
(30.27 KiB) Downloaded 120 times
config.log
(89.25 KiB) Downloaded 123 times
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Hello Yvan,

I tried one more time, avoided using the compilers in conda environment. I loaded the compilers from outside conda environment, except for C compiler (the /usr/bin/cc do exist, but it doesn't work). As shown in the figure below.
Compilers.png
Luckily, now I don't have the MED error mentioned in the last post. But I met another error, in the compile stage of scotch.
Error in scotch compiling.png
Checking the install_saturne.log file, the errors are:
../../lib/libscotch.so: error: undefined reference to 'pthread_create'
......
error.png
I found some similar errors in the forum, so I guess this error might not be as "strange" as the last one. But I have no idea how to get around it. Could you please give me some advice?

Many thanks,
Ruonan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Please find the log, setup_ini and setup files. Thank you very much Yvan! Ruonan
Attachments
setup_ini.txt
(4.08 KiB) Downloaded 136 times
setup.txt
(4.37 KiB) Downloaded 136 times
install_saturne.log
(2.51 MiB) Downloaded 120 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when compiling MED while installing on a remote cluster

Post by Yvan Fournier »

Hello,

This is an error in the build of PT-Scotch. You might be able to fix this in the scotch sources directory, by editing src/Makefile.inc, replacing -pthread by -lpthread in LDFLAGS.

I do no know why the base setup works outside of Conda and not inside though. I would guess it is related to different compilers/linkers being used, but would not expect this sort of impact using compilers of a same series (i.e. different versions of gcc).

Best regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Hello Yvan,

Thank you very much. Thanks for your suggestions, I agree with you, the issue might be due to the incompatible compilers/linkers being used. So I tried another time, started at the very beginning, "module purge" and then "module load" the compilers.

The currently loaded modules are:

Code: Select all

  1) GCCcore/5.4.0                   6) OpenMPI/1.10.3-GCC-5.4.0-2.26                             11) foss/2016b                  16) Tcl/8.6.5-foss-2016b      21) libffi/3.2.1-foss-2016b
  2) binutils/2.26-GCCcore-5.4.0     7) OpenBLAS/0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1               12) bzip2/1.0.6-foss-2016b      17) SQLite/3.13.0-foss-2016b  22) Python/3.5.2-foss-2016b
  3) GCC/5.4.0-2.26                  8) gompi/2016b                                               13) zlib/1.2.8-foss-2016b       18) Tk/8.6.5-foss-2016b       23) cmake/3.16.5
  4) numactl/2.0.11-GCC-5.4.0-2.26   9) FFTW/3.3.4-gompi-2016b                                    14) ncurses/6.0-foss-2016b      19) GMP/6.1.1-foss-2016b
  5) hwloc/1.11.3-GCC-5.4.0-2.26    10) ScaLAPACK/2.0.2-gompi-2016b-OpenBLAS-0.2.18-LAPACK-3.6.1  15) libreadline/6.3-foss-2016b  20) XZ/5.2.2-foss-2016b
The setup_ini showed the compilers' versions are changed, though I'm not 100% sure this time will have no compatible problems.

Code: Select all

#========================================================
# Setup file for Code_Saturne installation
#========================================================
#
#--------------------------------------------------------
# Download packages ?
#--------------------------------------------------------
download  yes
#
#--------------------------------------------------------
# Install Code_Saturne with debugging symbols
#--------------------------------------------------------
debug     no
#
#--------------------------------------------------------
# Installation directory
#--------------------------------------------------------
prefix    /users/rw00793/Code_Saturne/7.1-alpha
#
#--------------------------------------------------------
# Optional architecture Name (installation subdirectory)
#--------------------------------------------------------
use_arch  no
arch      Linux_x86_64
#
#--------------------------------------------------------
# C compiler and optional MPI wrapper
#--------------------------------------------------------
compC     /users/rw00793/.conda/envs/myenv/bin/x86_64-conda-linux-gnu-cc
mpiCompC  /opt/eb-pkg/ebadmin/software/OpenMPI/1.10.3-GCC-5.4.0-2.26/bin/mpicc
#
#--------------------------------------------------------
# Fortran compiler
#--------------------------------------------------------
compF    /usr/bin/f95
#
#--------------------------------------------------------
# C++ compiler and MPI wrapper for optional packages
#
# Required only for static builds using the MED library
# or for build of optional modules such as MEDCoupling
# support.
#--------------------------------------------------------
compCxx     /opt/eb-pkg/ebadmin/software/GCCcore/5.4.0/bin/c++
mpiCompCxx  /opt/eb-pkg/ebadmin/software/OpenMPI/1.10.3-GCC-5.4.0-2.26/bin/mpicxx
#
#--------------------------------------------------------
# Python interpreter.
#--------------------------------------------------------
python    /opt/eb-pkg/ebadmin/software/Python/3.5.2-foss-2016b/bin/python3
#
#--------------------------------------------------------
# Disable the Graphical user Interface ?
#--------------------------------------------------------
disable_gui  no
#
#--------------------------------------------------------
# Disable frontend (also disables GUI) ?
# May be useful for debug builds and HPC cluster builds
# installed side-by side with a full build.
#--------------------------------------------------------
disable_frontend  no
#
#--------------------------------------------------------
# Optional SALOME platform install path.
#
# This is the path for the main SALOME directory,
# not the application directory.
#
# If Code_Saturne is built with SALOME support,
# running "code_saturne salome" will launch the
# associated application, containing the CFDSTUDY module.
#--------------------------------------------------------
salome    no
#
#--------------------------------------------------------
# Optional packages:
# ------------------
#
# MED / HDF5  For MED file format support
#             (used by SALOME and by Gmsh)
#
# CGNS / HDF5 For CGNS file support
#             (used by many meshing tools)
#
# Scotch (includes PT-Scotch) and/or ParMetis
# for parallel partitioning
#
#   For Linux workstations, HDF5, CGNS, and even MED
# packages may be available through the package manager.
# HDF5 is also often available on large systems.
# When building with SALOME, the platform distribution's
# packages may be used, by setting in the matching entry
# 'yes' under the "Use" column and simply 'salome' under
# the path column.
#
# Scotch and Pt-Scotch are available in some Linux
# distributions, but may be built with options
# incompatible with non-threaded Code_Saturne runs.
#
#   To install CGNS or ParMetis, the CMake
# configuration/installation tool is required
# (it is available in most Linux distributions).
#--------------------------------------------------------
#
#  Name    Use   Install  Path
#
hdf5       yes    yes      None
cgns       yes    yes      None
med        yes    yes      None
scotch     yes    yes      None
parmetis   yes    yes      None
#
#========================================================
When I installed this time, the last error in the "compile stage of scotch" disappeared. But an error occurred in the following step, "Error during configure stage of parmetis". From the log file, I found it's some cmake error.

Code: Select all

CMake Error at /opt/pkg/apps/cmake/3.16.5/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/opt/eb-pkg/ebadmin/software/OpenMPI/1.10.3-GCC-5.4.0-2.26/bin/mpicc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/gmake cmTC_2c6d2/fast && gmake[1]: Entering directory `/users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeTmp'
    gmake[1]: Warning: File `Makefile' has modification time 0.31 s in the future
    /usr/bin/gmake -f CMakeFiles/cmTC_2c6d2.dir/build.make CMakeFiles/cmTC_2c6d2.dir/build
    gmake[2]: Entering directory `/users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeTmp'
    gmake[2]: Warning: File `CMakeFiles/cmTC_2c6d2.dir/flags.make' has modification time 0.31 s in the future
    Building C object CMakeFiles/cmTC_2c6d2.dir/testCCompiler.c.o
    /opt/eb-pkg/ebadmin/software/OpenMPI/1.10.3-GCC-5.4.0-2.26/bin/mpicc   -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /users/rw00793/.conda/envs/myenv/include    -o CMakeFiles/cmTC_2c6d2.dir/testCCompiler.c.o   -c /users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeTmp/testCCompiler.c
    gcc: error: unrecognized command line option ‘-fno-plt’
    gmake[2]: *** [CMakeFiles/cmTC_2c6d2.dir/testCCompiler.c.o] Error 1
    gmake[2]: Leaving directory `/users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeTmp'
    gmake[1]: *** [cmTC_2c6d2/fast] Error 2
    gmake[1]: Leaving directory `/users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeTmp'
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "/users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeOutput.log".
See also "/users/rw00793/code_saturne-build/parmetis-4.0.3.build/metis/build/Linux-x86_64/CMakeFiles/CMakeError.log".
make: *** [config] Error 1

Could you please kindly guide me on how to get around this error? I think I might be almost there.

Many thanks,
Ruonan
Attachments
setup_ini.txt
(4.09 KiB) Downloaded 119 times
setup.txt
(4.39 KiB) Downloaded 122 times
install_saturne.log
(2.66 MiB) Downloaded 112 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when compiling MED while installing on a remote cluster

Post by Yvan Fournier »

Hello,

Both ParMetis and PT-SCOTCH are optional, and play similar roles. So I would first recommend dropping ParMetis, and possibly trying to complete the installation later once you have everything working.

Also, in general, if the semi-automatic install fails, I recommende switching to the lower-level (piece by piece) install.

Best regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Error when compiling MED while installing on a remote cluster

Post by Ruonan »

Hello Yvan,

Thank you very much. I made some progress but still have one more question please.

I tried to install without conda environment, and loaded the compilers wrappers carefully with the identical version. This time the HDF5, CGNS, Scotch and ParMetis can be installed smoothly.

But an error occurred during the compile stage of Code_Saturne, as shown below. I learned this may due to library linking. Could you please guide me on how to get around this error? I have already loaded the "zlib" and "libtool" modules, but the error was still there.

Code: Select all

/opt/eb-pkg/ebadmin/software/binutils/2.26-GCCcore-5.4.0/bin/ld.gold: error: cannot find -libverbs
collect2: error: ld returned 1 exit status
make[3]: *** [libsaturne.la] Error 1
make[3]: Leaving directory `/users/rw00793/code_saturne-master.build/src/apps'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/users/rw00793/code_saturne-master.build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users/rw00793/code_saturne-master.build'
make: *** [all] Error 2

Code: Select all

Currently Loaded Modules:
  1) cmake/3.16.5    3) binutils/2.26-GCCcore-5.4.0   5) numactl/2.0.11-GCC-5.4.0-2.26   7) OpenMPI/1.10.3-GCC-5.4.0-2.26   9) M4/1.4.17
  2) GCCcore/5.4.0   4) GCC/5.4.0-2.26                6) hwloc/1.11.3-GCC-5.4.0-2.26     8) zlib/1.2.8-GCCcore-5.4.0       10) libtool/2.4.6
Best regards,
Ruonan
Attachments
setup_ini.txt
(4.01 KiB) Downloaded 117 times
setup.txt
(4.26 KiB) Downloaded 118 times
install_saturne.log
(2.75 MiB) Downloaded 116 times
Post Reply