安装openmpi-3.1.0

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

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.ide

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.gzget

目前版本: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的信息it

ompi_info

相关文章
相关标签/搜索