安装软件依赖包
yum -y install gcc gcc-c++ gcc-gfortran
yum install openmpi-devel
安装openmpi
tar -zxvf openmpi
cd openmpi/
./configure --prefix=/usr/local/openmpi
make all install
cd ~
vim .bash_profile
添加:
PATH=${PATH}:/usr/local/openmpi/bin
LD_LIBRARY_PATH=/usr/local/openmpi/lib
完成之后让设置生效
source .bash_profile
测试,写个简单的MPI模板test文件
mpirun --allow-run-as-root -np 5 test