I recently installed Intel's Parallel Studio XE 2019 under an academic license, and I'm trying to compile Fortran90 code that employs MPI. I get the following error:
>> ifort -O3 -ip -ipo -c parallel.f90
parallel.f90(7): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MPI]
use mpi
------^
Apparently ifort
is not able to find an MPI library. As I understood it, the Intel library comes with its own MPI libraries, so I think I shouldn't be concerned with linking to e.g. libopenmpi
. When I compile the same code with GNU's mpif90
, everything works as intended.
Below I've included the (redacted) output of echo $LD_LIBRARY_PATH
. Is there anything missing?
/home/***/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/lib
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib/release
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib
/home/***/intel/compilers_and_libraries_2019.1.144/linux/ipp/lib/intel64
/home/***/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin
/home/***/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64_lin
/home/***/intel/compilers_and_libraries_2019.1.144/linux/tbb/lib/intel64/gcc4.7
/home/***/intel/compilers_and_libraries_2019.1.144/linux/tbb/lib/intel64/gcc4.7
/home/***/intel/compilers_and_libraries_2019.1.144/linux/daal/lib/intel64_lin
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/lib
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib/release
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib
/home/***/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/lib
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib/release
/home/***/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/lib
/home/***/intel/compilers_and_libraries_2019.1.144/linux/ipp/lib/intel64
/home/***/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin
/home/***/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64_lin
/home/***/intel/compilers_and_libraries_2019.1.144/linux/tbb/lib/intel64/gcc4.7
/home/***/intel/compilers_and_libraries_2019.1.144/linux/tbb/lib/intel64/gcc4.7
/home/***/intel/compilers_and_libraries_2019.1.144/linux/daal/lib/intel64_lin
/home/***/intel/compilers_and_libraries_2019.1.144/linux/daal/../tbb/lib/intel64_lin/gcc4.4
[EDIT] contents of echo $PATH
:
/home/****/intel/intelpython3/bin
/home/****/intel/advisor_2019.1.0.579143/bin64
/home/****/intel/vtune_amplifier_2019.1.0.579888/bin64
/home/****/intel/inspector_2019.1.0.579146/bin64
/home/****/intel/compilers_and_libraries_2019.1.144/linux/bin/intel64
/home/****/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/bin
/home/****/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/bin
/home/****/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/bin
/home/****/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/bin
/home/****/intel/compilers_and_libraries_2019.1.144/linux/bin/intel64
/home/****/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/bin
/home/****/intel//compilers_and_libraries_2019.1.144/linux/mpi/intel64/bin
/home/****/anaconda3/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
/home/****/intel//parallel_studio_xe_2019.1.053/bin
If you want yo use Intel MPI with Intel Fortran compiler, the wrapper is mpiifort
.
If you want to use an other MPI (such as Open MPI) with use mpi
then you likely need to rebuild the MPI library because Fortran modules are not interoperable between vendors, and sometimes not even different compiler versions of the same vendor.
I strongly discourage you to use ifort
and manually set the include and library path.
FWIW, Intel MPI mpif90
uses the GNU gfortran compiler.