1.确认以下编译器已安装:

yum install gcc

gcc –version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

python --version

Python 2.7.5

建议去官方网站下载最新版本:http://www.open-mpi.org
2.下载(默认至当前用户的Downloads目录下)
URL: http://www.open-mpi.org
https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.0.tar.gz

目前版本:openmpi-3.1.0.tar.gz
3.解压openMPI安装文件,放在当前用户目录下:
tar zxvf openmpi-3.1.0.tar.gz
4.进入安装文件目录
cd openmpi-3.1.0
5.安装openMPI(默认至目录:/usr/local/lib):
./configure
6.安装所有需要的文件:
sudo make all install
7.添加库共享路径:
sudo gedit /etc/profile
在profile文件的最后加上一行:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
8.使该配置文件生效:
source /etc/profile
9.进行测试:
要使用普通用户执行
cd openmpi-3.1.0/examples
make
$mpirun -np 4 hello_c

查看OpenMPI的信息

ompi_info