Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
104 Views

OneAPI compilers cannot find MPI libraries

Jump to solution

Hello,
I'm trying to test the new oneAPI version but even simple compilations produce errors. The installation includes BaseKit & HPCKit, and everything looks fine once completed. However, compiling even a simple HelloWorld code with mpicc (installed at /opt/intel/oneapi/mpi/2021.1-beta10/bin) returns:
/usr/bin/ld: cannot find -lmpifort
/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
However, at least the first library is there:

ldconfig -p | grep libmpi
libmpijava.so.1 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpijava.so.1
libmpijava.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpijava.so
libmpifort.so.12 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpifort.so.12
libmpifort.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpifort.so
libmpicxx.so.12 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpicxx.so.12
libmpicxx.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpicxx.so
libmpi_shm_heap_proxy.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpi_shm_heap_proxy.so

The system is running Ubuntu 20.04 and oneAPI was built with gnu 9.3.0. The error doesn't make sense to me so either something is wrong or I'm missing something (probably the latter).
Thanks.

0 Kudos

Accepted Solutions
Highlighted
Moderator
78 Views

Hi,

Thanks for reaching out to us.


As mentioned by you, we can see that you are running on Ubuntu 20.04. But as per the oneAPI HPC toolkit system requirements documentation currently Ubuntu* 18.04.3 LTS is the supported Target OS in Ubuntu.

Please refer the below link for more information about the System requirements for oneAPI HPC Toolkit.

https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-hpc-toolkit-system-requir...


However, Could you please let us know whether you have sourced the setvars.sh script file before running the code?

If not, please source the setvars.sh file located at /opt/opt/intel/oneapi/mpi/2021.1-beta10/ and run the sample code.

If you still face the issue could you please try reinstalling the HPCkit and try running the code again?

Please refer the below guides for more information

Installation guide:

https://software.intel.com/content/www/us/en/develop/articles/installation-guide-for-intel-oneapi-to...

Get Started with the Intel® oneAPI HPC Toolkit:

https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-hpc...

Have a Good day!


Regards

Goutham


View solution in original post

0 Kudos
4 Replies
Highlighted
Moderator
79 Views

Hi,

Thanks for reaching out to us.


As mentioned by you, we can see that you are running on Ubuntu 20.04. But as per the oneAPI HPC toolkit system requirements documentation currently Ubuntu* 18.04.3 LTS is the supported Target OS in Ubuntu.

Please refer the below link for more information about the System requirements for oneAPI HPC Toolkit.

https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-hpc-toolkit-system-requir...


However, Could you please let us know whether you have sourced the setvars.sh script file before running the code?

If not, please source the setvars.sh file located at /opt/opt/intel/oneapi/mpi/2021.1-beta10/ and run the sample code.

If you still face the issue could you please try reinstalling the HPCkit and try running the code again?

Please refer the below guides for more information

Installation guide:

https://software.intel.com/content/www/us/en/develop/articles/installation-guide-for-intel-oneapi-to...

Get Started with the Intel® oneAPI HPC Toolkit:

https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-hpc...

Have a Good day!


Regards

Goutham


View solution in original post

0 Kudos
Highlighted
73 Views

Hi Goutham,
Sourcing setvars.sh partially solves the problem. [In the documentation, this step is not discussed until the FPGA section, not during the general installation; however, it is mentioned in the requirement guide and it could also be that the script said something that I didn't pay attention to, cannot recall]. Anyway, I was able to compile a simple code but building larger apps fails at linking. The message is /usr/bin/ld: cannot find -lmpi. I manually expanded the linking options to include libmpi so that the system now sees:
ldconfig -p | grep libmpi
libmpijava.so.1 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpijava.so.1
libmpijava.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpijava.so
libmpifort.so.12 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpifort.so.12
libmpifort.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpifort.so
libmpicxx.so.12 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpicxx.so.12
libmpicxx.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpicxx.so
libmpi_shm_heap_proxy.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/libmpi_shm_heap_proxy.so
libmpi_ilp64.so.4.1 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/release/libmpi_ilp64.so.4.1
libmpi_ilp64.so.4 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/release/libmpi_ilp64.so.4
libmpi_ilp64.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/release/libmpi_ilp64.so
libmpi.so.12 (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/release/libmpi.so.12
libmpi.so (libc6,x86-64) => /opt/intel/oneapi/mpi/2021.1-beta10/lib/release/libmpi.so
So the library is there but the compiler just cannot use it (similarly to what was happening with libmpifort yesterday). My understanding is that to configure the system, IntelMPI sometimes requires to source $.<installdir>/bin64/mpivars.sh [option] but this script is not in the distribution. The closest thing is /opt/intel/oneapi/mpi/2021.1-beta10/env/vars.sh but sourcing it didn't make any difference.
Thanks,
Arturo

0 Kudos
Highlighted
42 Views

It finally worked. Thanks.

0 Kudos
Highlighted
Moderator
18 Views

Hi, 

Glad to know that your issue is resolved!

Thanks for the confirmation.

As this issue has been resolved, we will no longer respond to this thread. 

If you require any additional assistance from Intel, please start a new thread. 

Any further interaction in this thread will be considered community only. 

Have a Good day!


Thanks & Regards

Goutham


0 Kudos