Home > Back-end >  warning libgfortran.so.3 needed by may conflict with libgfortran.so.5
warning libgfortran.so.3 needed by may conflict with libgfortran.so.5

Time:03-08

while compiling I get the following warning:

/usr/bin/ld: warning: libgfortran.so.3, needed by /usr/openmpi-4.0.3rc4/lib64/libmpi_usempi.so, may conflict with libgfortran.so.5

It does create the .exe but when executing it an error occurs:

ideal.exe: error while loading shared libraries: libgfortran.so.5: cannot open shared object file: No such file or directory

I search for it to try and link it but it didn't work

whereis libgfortran.so.5

libgfortran.so: /usr/lib64/libgfortran.so.3

I don't have much knowlegde about linux or compilers and I'm working on a SUSE server without sudo permission. The gnu fortran compiler I'm using is in my home directory /home/gomezmr/gcc . Does anyone know how to solve this? Thank you.

CodePudding user response:

Your OpenMPI library was compiled for a different version of GCC/gfortran than the version you are using for compiling. The MPI library must be compiled for the same compiler version that you are using for compiling.

In simple cases it may happen that it will somehow work anyway, but problems like yours can happen. When using the mpi or mpi_f08 modules, the major release version must match (e.g. both GCC9 or both GCC 11,...).

  • Related