OpenMPI - Ubuntu安装与配置

前端之家收集整理的这篇文章主要介绍了OpenMPI - Ubuntu安装与配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

OpenMPI- Ubuntu安装与配置

OpenMPI安装

  1. 下载OpenMPI v2.0.2
  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
  1. 编译安装
sudo make
sudo make install
  1. 配置环境变量(~/.bashrc)
export PATH=$PATH:/usr/local/openmpi/bin  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openmpi/lib/  
source ~/.bashrc  
sudo ldconfig
  1. 测试
cd examples
make
mpirun -np 8 hello_c

猜你在找的Ubuntu相关文章