> Am 28.11.2017 um 17:19 schrieb Reuti <re...@staff.uni-marburg.de>: > > Hi, > >> Am 28.11.2017 um 15:58 schrieb Vanzo, Davide <davide.va...@vanderbilt.edu>: >> >> Hello all, >> I am having a very weird problem with mpifort that I cannot understand. >> I am building OpenMPI 1.10.3 with GCC 5.4.0 with EasyBuild and everything >> goes fine until I try to use mpifort to build any MPI Fortran code, which >> fails with the error log you see below. >> The thing I do not understand is why the linker searches for libgfortran.so >> in /usr/lib64 instead of the actual GCC installation path,
One additional note on this: often a package contains only a runtime library like: libfoobar.so.1.0 as symbolic link to => libfoobar.so.1.0.5 libfoobar.so.1.0.5 is the real library file A developer package on the other hand contains: libfoobar.a libfoobar.so as symbolic link to either => libfoobar.so.1.0.5 or to => libfoobar.so.1.0 (I see either implementation on a couple of them across the libraries in my openSUSE distribution. Both are woking and it seems to be a taste of the developer of a package which one to use.) During compilation it will look for the target of libfoobar.so up to libfoobar.so.1.0.5. Inside libfoobar.so.1.0.5 it will extract the "-soname" which is libfoobar.so.1.0 and put this name in the application. During execution it will then find libfoobar.so.1.0 in the executable (`readelf -d <file>`) and load the target it points to at runtime. -- Reuti >> where the file is actually located. Both LD_LIBRARY_PATH and LIBRARY_PATH >> contain the correct path to the library. The gfortran compiler works >> correctly for compiling serial code. >> Attached you can also find the ourput of the same command with LD_DEBUG=1. >> Any idea what is going wrong? > > Although 1.10.3 is outdated and the use of a newer Open MPI version > advisable, the culprit seems to lie in: > >> cannot open /usr/lib64/libgfortran.so: No such file or directory > > Does this symbolic link exist? Does it point to your installed one too? > > Maybe the developer package of GCC 5.4.0 is missing. Hence it looks for > libgfortran.so somewhere else and finds only a broken symbolic link. > > -- Reuti > > >> Thank you for your help! >> >> $ ll /accre/arch/easybuild/software/Core/GCCcore/5.4.0/lib64/libgfortran.so >> lrwxrwxrwx 1 buildbot buildbot 20 Nov 27 18:44 >> /accre/arch/easybuild/software/Core/GCCcore/5.4.0/lib64/libgfortran.so -> >> libgfortran.so.3.0.0 >> >> $ mpifort multitask_mpi.f90 >> /accre/arch/easybuild/software/Compiler/GCCcore/5.4.0/binutils/2.26/bin/ld.gold: >> error: cannot open /usr/lib64/libgfortran.so: No such file or directory >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_date_and_time' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_st_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_integer_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_string_trim' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_character_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_integer_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_integer_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_character_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_integer_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_character_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_transfer_character_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_string_trim' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined >> reference to '_gfortran_st_write_done' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function p0_receive_output_: error: >> undefined reference to '_gfortran_st_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function p0_receive_output_: error: >> undefined reference to '_gfortran_st_write_done' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function p0_receive_output_: error: >> undefined reference to '_gfortran_st_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function p0_receive_output_: error: >> undefined reference to '_gfortran_st_write_done' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function p0_receive_output_: error: >> undefined reference to '_gfortran_st_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function p0_receive_output_: error: >> undefined reference to '_gfortran_st_write_done' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_stop_string' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_transfer_real_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_stop_string' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_transfer_real_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_stop_string' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_transfer_real_write' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function MAIN__: error: undefined >> reference to '_gfortran_stop_string' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function main: error: undefined reference >> to '_gfortran_set_args' >> /tmp/ccpSxqE6.o:multitask_mpi.f90:function main: error: undefined reference >> to '_gfortran_set_options' >> collect2: error: ld returned 1 exit status >> -- >> Davide Vanzo, PhD >> Application Developer >> Adjunct Assistant Professor of Chemical and Biomolecular Engineering >> Advanced Computing Center for Research and Education (ACCRE) >> Vanderbilt University - Hill Center 201 >> (615)-875-9137 >> www.accre.vanderbilt.edu >> <ld_debug.out>_______________________________________________ >> users mailing list >> users@lists.open-mpi.org >> https://lists.open-mpi.org/mailman/listinfo/users > _______________________________________________ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users