Hello Davide,

On 11/28/17 15:58, Vanzo, Davide wrote:
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,  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?

The place the link-time link editor ld searches for still seems to be /usr/lib64 first.

$ 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

So I assume you mean to invoke a gfortran binary located at

/accre/arch/easybuild/software/Core/GCCcore/5.4.0/bin/gfortran

?

$ mpifort multitask_mpi.f90

What does "mpifort -show" report what gfortran command is used? If the first part is simply gfortran, what does "which gfortran" print?

/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

so obviously your build finds something named libgfortran.so in /usr/lib64 but cannot use it. Is it a defunct symbolic link?

/tmp/ccpSxqE6.o:multitask_mpi.f90:function timestamp_: error: undefined  > 
reference to '_gfortran_date_and_time'
[...]
These are just followup errors from not being able to find the correct 
libgfortran.

Regards, Thomas


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to