CentOS7安装OpenMPI 4.0.5

  运维

安装依赖

yum groupinstall -y 'Development Tools'
yum install -y perl 

openmpi下载:

https://www.open-mpi.org
https://www.open-mpi.org/software/ompi/v4.0/
https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.5.tar.gz

编译安装

tar zxvf openmpi-4.0.5.tar.gz
cd openmpi-4.0.5
./configure --prefix=/opt/openmpi
make all install

环境变量

/etc/profile文件中加入以下内容

###openmpi
export PATH=$PATH:/opt/openmpi/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openmpi/lib

刷新下环境变量:

source /etc/profile

验证

[root@localhost openmpi-4.0.5]# mpiexec -V
mpiexec (OpenRTE) 4.0.5

Report bugs to http://www.open-mpi.org/community/help/

可能的报错,安装上面依赖即可:

configure: error: "Open MPI requires perl. Aborting"
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

LEAVE A COMMENT

Captcha Code