Openmpi

Openmpi是并行库,类似Intel编译器中的MPI。下载openmpi-1.8.8.tar.gz

安装,

./configure -prefix=/root/bin/openmpi1.8.8 CC=icc CXX=icpc F77=ifort FC=ifort F90=ifort && make -j 2 && make install

在.bashrc中添加环境变量,

export PATH=/root/bin/openmpi1.8.8/bin:$PATH
export LD_LIBRARY_PATH=/root/bin/openmpi1.8.8/lib:$LD_LIBRARY_PATH
export MANPATH=/root/bin/openmpi1.8.8/share/man:$MANPATH
#export OMP_NUM_THREADS=2

运行,

mpirun -np 2 --allow-run-as-root