- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I wanted to compile a code with mpif90 (which i got from openmpi compiled with the intel compiler) but I get the error:
/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64/libifport.so.5: undefined reference to `for_ifcore_version'
I have the Intel Parallel Studio XE Composer Edition for Fortran and C++ (Linux) (parallel_studio_xe_2016.0.047) installed.
I started with loading the environment variables:
source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh -arch intel64 -platform linux
source /opt/intel/compilers_and_libraries/linux/mpi/bin64/mpivars.sh
export PATH=/opt/OpenMPI-intel/bin:$PATH
export LD_LIBRARY_PATH=/opt/OpenMPI-intel/lib:$LD_LIBRARY_PATH
and then I compile with:
mpif90 dns.f
mpif90 -O3 dns.o -lmpi
What did I do wrong?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's actually linking, not compiling. You're not linking against the 16.0 Fortran run-time libraries. It could be that the mpivars.sh set the wrong value for the environment variable. Try sourcing mpivars.sh before compilervars.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're using OpenMPI, you should not be sourceing the Intel MPI mpivars.sh. Instead, you should be setting PATH and LD_LIBRARY_PATH to your OpenMPI, and verifying that mpif90 -V agrees with the version of ifort you wished to set up by compilervars.
The OpenMPI paths have to be set after sourceing compilervars, to avoid having ifort coarray MPI come before OpenMP on path.
I haven't got to the linux installation of xe2016 release, but I would note that the default Windows installation directories were changed again in the release, so you have the possibility of inadvertently mixing beta and release path setting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll just note that for_ifcore_version is a new routine in 16.0 - see the release notes. It should be satisfied by libifcore and I see that the reference is from libifport in the correct directory, so I am not sure why you're getting the error. Make sure that libifcore is getting linked in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tim Prince thanks that fixed it for me!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to what Steve said, it looks like an older shared library is creeping in. You'd likely need help from your sysadmin to check that the ifort library installation under module is correct.
Maybe your openmpi was built with an earlier ifort version. If you would load the ifort module after the openmpi it could be corrected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page