前端之家收集整理的这篇文章主要介绍了
OpenMPI - Ubuntu安装与配置,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
OpenMPI- Ubuntu安装与配置
- 下载OpenMPI v2.0.2
- 解压文件,并进入文件夹,指定安装路径(默认路径:/usr/local/lib)
wget https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.2.tar.gz
tar zxvf openmpi-2.0.2.tar.gz
cd openmpi-2.0.2
sudo ./configure --prefix=/usr/local
- 编译安装
sudo make
sudo make install
- 配置环境变量(~/.bashrc)
export PATH=$PATH:/usr/local/openmpi/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openmpi/lib/
source ~/.bashrc
sudo ldconfig
- 测试
cd examples
make
mpirun -np 8 hello_c
原文链接:https://www.f2er.com/ubuntu/352840.html