Can not install openmpi with Intel oneAPI
I have oneAPI installed and environments set. mpiifort
works, as does ifor -V
, which returns the correct compiler version.
I am trying to setup openmpi with the Intel compiler, as it is required by CosmoMC. I am configuring it like this:
./configure --prefix=/usr/local/ F77=/opt/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/ifort FC=/opt/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/ifort F90=/opt/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/ifort ICC=/opt/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/icc ICPC=/opt/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/icpc
but after that when I sudo make
some error occurs. The latest is:
ifort: command line warning #10434: option '-nofor_main' use with underscore is deprecated; use '-nofor-main' instead
ld: /opt/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/../../bin/intel64/../../lib/icx-lto.so: error loading plugin: libimf.so: cannot open shared object file: No such file or directory
make[2]: *** [Makefile:1903: libmpi_usempi_ignore_tkr.la] Error 1
make[2]: Leaving directory '/home/souvik/cosmology/openmpi-4.1.0/ompi/mpi/fortran/use-mpi-ignore-tkr'
make[1]: *** [Makefile:3555: all-recursive] Error 1
make[1]: Leaving directory '/home/souvik/cosmology/openmpi-4.1.0/ompi'
make: *** [Makefile:1901: all-recursive] Error 1
I have tried many options like declaring paths, etc., but nothing solves it. The problem is even with some other configuration I avoid the error, but then mpif90 -V
does not return the correct Intel compiler version.
I recently bumped into exactly this error. I was installing openmpi to a directory owned by root via sudo -E make install
, which would fail with the error message you posted. I was only able to resolve this by installing to a directory I own, with make install
(no sudo
). I wish I knew why sudo -E
wouldn't work in this case. I still installed to the directory I wanted to originally, I just had to give it the right permissions.
I met the same error recently and hope my solution will help.
I made a symbolic link of libimf.so
to the /usr/lib
(Ubuntu 19 for my case) following this answer to X windows hanging during Ubuntu boot.
I did the same for later error related with .so libraries
. Finally it compiled successfully. A similar posting is included: Re: [OMPI users] OpenMPI 1.6.4 and Intel Composer_xe_2013.4.183: problem with remote runs, orted: error while loading shared libraries: libimf.so
I am a newbee in OpenMPI and Linux so still have no idea about the reason and the library priority setting in Linux yet...