Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2154 Discussions

Linker errors with libmpiif.so

intel_sw
Beginner
750 Views
Hi all,

I am trying to compile an application program called Parallel Ocean Program (http://climate.lanl.gov/Models/POP/).

I am using ifort and mpiifort to compile the program. I am also using Intel Trace analyzer and collector libraries to
trace the communication patterns, etc. once the executable is created.

All the object files are successfully created but I get the following errors at the linking stage:

/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPIR_Err_return_comm'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPID_Wtime_todouble'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPIR_Grequest_set_lang_f77'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPIR_Keyval_set_fortran90'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPID_Wtick'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPIR_Keyval_set_fortran'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `MPIR_Err_create_code'
/opt/intel/impi/3.2.0.011/lib/libmpiif.so: undefined reference to `b_use_gettimeofday'

mpiifort -link-info returns the following:

ifort -I/opt/intel/impi/3.2.0.011/include -I/opt/intel/impi/3.2.0.011/include -L/opt/intel/impi/3.2.0.011/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker $libdir -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/3.2 -lmpi -lmpiif -lmpigi -lrt -lpthread -ldl

Any help would be appreciated.
Thanks.
0 Kudos
6 Replies
Andrey_D_Intel
Employee
750 Views

Hi,

Could you clarify your system configuration and compiler version? The output from the ifort -V command would be helpful.

Best regards,
Andrey
0 Kudos
Andrey_D_Intel
Employee
750 Views

Also, could you provide the exact link command you are using at link stage?

Best regards,
Andrey
0 Kudos
fluder
Beginner
750 Views

Also, could you provide the exact link command you are using at link stage?

Best regards,
Andrey

Any resolution to this problem. I'm getting it compiling gromacs and the link step uses mpiicc
Gene
0 Kudos
Gergana_S_Intel
Employee
750 Views

In response to the original post, as Andrey mentioned, it would be great to have some information regarding the system, the compiler version, etc. Additionally, I see that you're using Intel MPI libraries available from the /opt/intel/impi/3.2.0.011/lib directory. If you're running an Intel 64 machine, this will be pulling the 32-bit version of the libraries. If you'd like to use the 64-bit versions, use the lib64, bin64, and include64 directories instead.

Gene, can you also verify that yourPATH and LD_LIBRARY_PATH are set accordingly? This might a simple issue of the Makefile not being able to see all Intel MPI libraries. I would recommend sourcing the appropriate mpivars.sh script available in the /bin[64] directory before linking.

Hope this helps,
~Gergana

0 Kudos
Fruchtl__Herbert
750 Views
I was just writing a follow-up describing that I have the same problem, when I found the source of it: there is a different libmpi.a and libmpi.so in the LD_LIBRARY_PATH (in my case in /share/apps/lib; this is a ROCKS cluster). Don't remember if I installed this or if it's the default OpenMPI hat came with ROKS.

HTH,

Herbert
0 Kudos
Dmitry_K_Intel2
Employee
750 Views
Quoting - Herbert Fruchtl
I was just writing a follow-up describing that I have the same problem, when I found the source of it: there is a different libmpi.a and libmpi.so in the LD_LIBRARY_PATH (in my case in /share/apps/lib; this is a ROCKS cluster). Don't remember if I installed this or if it's the default OpenMPI hat came with ROKS.

HTH,

Herbert

Thank you, Herbert, for you comment and investigation.
This is common situation when a customer experiences problems with different packages installed on a system.

Best wishes
Dmitry
0 Kudos
Reply