openmpi安装

2020-04-04

e5f56f72adc449469277bf1ffe9becc3.jpg

以openmpi-2.1.1.tar.gz为例

1、创建安装目录:#mkdir /mnt/openmpi


2、解压安装包后,进入openmpi,输入:

./configure --prefix=/opt/openmpi CC=icc FC=ifort CXX=icpc --enable-mpi-fortran


3、上一步成功后,输入:make&&make install


4、安装成功后,把路径写进环境变量里:vi /etc/profile

     export MPI_HOME=/opt/openmpi   

     export PATH=$MPI_HOME/bin:$PATH   

     export LD_LIBRARY_PATH=$MPI_HOME/lib:$LD_LIBRARY_PATH   


5、保存退出并刷新:source /etc/profile


6、检验有没有安装成功:which mpif90






阅读643
分享