编译模板:OpenMPI


1.OpenMPI-3.1.3 Linux-x86_64 / intel编译器
 module load intel-compiler-2015-x86_64
./configure --prefix=/home/MyID/Tool/OpenMPI CC=icc CXX=icpc F77=ifort FC=ifort

(根据ORCA手册的建议,3.1.x版还需要加上参数--disable-builtin-atomics)

make
make install(若定义了--prefix执行此步,可选)

编译结束后,打开 ~/.bashrc,添加环境变量:
export PATH=/home/MyID/Tool/OpenMPI/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/MyID/Tool/OpenMPI/lib
source ~/.bashrc(或重新打开终端)

验证:
which mpicc
which mpic++
which mpif77
which mpif90