OpenMPI安装
操作步骤
- 安装IB驱动。
- 使用PuTTY工具,以root用户登录服务器。
- 在服务器上创建“/home/OpenMPI”目录,如果系统中有共享目录或者文件系统,则建议把OpenMPI上传、安装到共享目录或文件系统中。
mkdir /home/OpenMPI
- 上传OpenMPI安装包“openmpi-4.0.1.tar.gz”到指定的一台服务器“/home/OpenMPI”目录。
- 执行以下命令安装OpenMPI,安装编译大约耗时30分钟。
cd /home/OpenMPI tar zxvf openmpi-4.0.1.tar.gz cd openmpi-4.0.1 mkdir build cd build ../configure --prefix=/home/OpenMPI --enable-pretty-print-stacktrace --enable-orterun-prefix-by-default --with-knem=/opt/knem-1.1.3.90mlnx1/ --with-hcoll=/opt/mellanox/hcoll/ --with-cma --with-platform=../contrib/platform/mellanox/optimized make && make install
- 在所有参与IMB测试的服务器都需要执行以下命令配置环境变量。
- 打开文件。
vi /root/.bashrc
或者
vi /etc/profile
- 按“i”进入编辑模式,将以下内容添加到“/root/.bashrc”或者“/etc/profile”文件的最后。
MPI_HOME=/home/OpenMPI export PATH=${MPI_HOME}/bin:$PATH export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
- 按“Esc”键,输入:wq!,按“Enter”保存并退出编辑。
- 打开文件。
- 执行以下命令使环境变量生效。
source /root/.bashrc
或者
source /etc/profile
父主题: 软件安装及环境配置