Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
“英特尔Fortran编译器”找不到模块“mpi”`_Fortran_Mpi_Intel Parallel Studio - Fatal编程技术网

“英特尔Fortran编译器”找不到模块“mpi”`

“英特尔Fortran编译器”找不到模块“mpi”`,fortran,mpi,intel-parallel-studio,Fortran,Mpi,Intel Parallel Studio,我最近在学术许可下安装了Intel的并行Studio XE 2019,我正在尝试编译使用MPI的Fortran90代码。我得到以下错误: >> 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 ------^ 显然,ifort无法找到MPI

我最近在学术许可下安装了Intel的并行Studio XE 2019,我正在尝试编译使用MPI的Fortran90代码。我得到以下错误:

>> 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
------^
显然,
ifort
无法找到MPI库。据我所知,英特尔库有自己的MPI库,因此我认为我不应该关心链接到例如
libopenmpi
。当我用GNU的mpif90编译相同的代码时,一切都按预期工作

下面我已经包括了
echo$LD\u LIBRARY\u PATH
的(编辑)输出。少了什么吗

/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
[编辑]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

如果要将“英特尔MPI”与“英特尔Fortran编译器”一起使用,包装器为
mpiFort

如果要将其他MPI(如Open MPI)与
使用MPI
一起使用,则可能需要重建MPI库,因为Fortran模块在供应商之间不可互操作,有时甚至同一供应商的不同编译器版本也不可互操作

我强烈建议您使用
ifort
并手动设置include和library路径


FWIW,英特尔MPI
mpif90
使用GNU gfortran编译器。

您可能应该使用mpif90而不是ifort进行编译-这解决了问题吗?
mpif90
链接到
gfortran
。你的意思是
mpiif90
(注意双i)?如果是这样:
命令“mpif90”未找到,您的意思是:…
是我调用
mpif90
时得到的结果。您的计算机中可以有多个
mpif90
。您是如何为英特尔编译器安装MPI的?您是否根据需要使用
ifortvars.sh
脚本?MPiFort呢?受@VladimirF MPI的启发,并行Studio XE附带了mpif90,但我是从系统的存储库中安装的(
apt install libopenmpi dev
)。我按照说明获取了
psxevars.sh
,这应该是
ifortvars.sh
(在我的
intel
目录中哪里可以找到
ifortvars.sh
)@IanBush
mpiifort
也无法识别。当前在我的系统上找不到
mpiifort
,在并行Studio安装目录中也找不到它。但根据您的说法,
使用mpi
不能与英特尔产品一起使用吗?因此,无法同时使用
gfortran
ifort
编译相同的代码?可能没有“英特尔MPI学术版”的许可证,只安装了运行时(免费使用)。如果
使用mpi
,则必须使用与构建mpi库相同的编译器。Intel wrappers有点隐藏了这一点,但开放MPI的情况并非如此。如果您计划同时使用这两个编译器,那么您必须构建并安装openmpi两次。Fortran模块的互操作性不限于MPI。您不能使用
gfortran
构建模块
foo
,然后使用
ifort
构建另一个
使用foo
的源代码。总之,
use-MPI
仅在使用
ifort
构建Open MPI时才能与
ifort
配合使用。只有
Parallel Studio XE cluster edition
具有完整的英特尔MPI。如果不是,则只有运行时可用。不过,您可能只能获得“英特尔MPI”的学术许可证。谢谢您的建议。我将尝试使用英特尔编译器编译OpenMPI并将其链接@VladimirF您提到可以在一个系统上有多个
mpif90
实例。如何正确地执行此操作(而不破坏我的GNU配置)?@MPA,您可以在不同的目录中构建和安装多个MPI库。只要它们不同时在
PATH
LD\u LIBRARY\u PATH
中,事情就应该是好的。通过修改指向要使用的版本的路径,可以在它们之间切换。这最好使用环境管理工具(如模块)来完成,这是目前HPC安装的黄金标准。