标签:
1. OpenMPI环境搭建
(1)下载和解压
wget https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.3.tar.gz
tar -zxvf openmpi-1.10.3.tar.gz
(2)配置,编译和安装
./configure --prefix=/usr/local/openmpi
make
make install
说明:如果不指定--prefix,那么默认的安装路径是/usr/local/lib。
(3)配置环境变量(~/.bashrc)
export PATH=$PATH:/usr/local/openmpi/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openmpi/lib/ source ~/.bashrc
sudo ldconfig
(4)进行测试
cd openmpi-1.10.3/examples
make
mpirun -np 4 hello_c
输出结果,如下所示:
参考文献:
[1] ubuntu下安装openMPI:http://blog.csdn.net/swuteresa/article/details/9405383
标签:
原文地址:http://www.cnblogs.com/shengshengwang/p/5634311.html