安装环境
# centos7.9
yum install -y perl-CPAN
yum install -y autoconf
yum install -y libtool
yum install -y libtool-ltdl
yum install -y flex
编译
openmpi 4.1.6
wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.6.tar.gz
tar xvf v4.1.6.tar.gz
cd ompi-4.1.6/
./autogen.pl
./configure --prefix=/opt/app/openmpi/4.1.6
make
make install
# 环境变量
MPI_HOME=/opt/app/openmpi/4.1.6
export PATH=${MPI_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MANPATH=${MPI_HOME}/share/man:$MANPATH