Skip to content

Commit 8c5260c

Browse files
authored
add install openmpi
1 parent d3127ff commit 8c5260c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/sys/hpc.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,23 @@
1010
* Labs:
1111
* CS149 并行计算(该课程与15-418一致) Lab:[[Github](https://github.com/stanford-cs149/asst1)]
1212
* HPC101 Lab:[[主页](https://www.zjusct.io/HPC101-Labs-2022/)]
13+
### OpenMPI的安装
14+
1. OpenMPI的下载及解压: 在[OpenMPI官方主页](https://www-lb.open-mpi.org/software/ompi/v5.0/)找到合适版本的OpenMPI下载并解压
15+
```shell
16+
wget https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.5.tar.gz
17+
tar xf openmpi-5.0.5.tar.gz
18+
cd openmpi-5.0.5
19+
```
20+
2. 配置安装路径,编译并安装,安装路径自定义
21+
```shell
22+
./configure --prefix=/usr/local/openmpi
23+
make -j $(nproc) all
24+
make install
25+
```
26+
3. 设置环境变量,路径为自己安装的路径
27+
```shell
28+
MPI_HOME=/usr/local/openmpi
29+
export PATH=$MPI_HOME/bin:$PATH
30+
export LD_LIBRARY_PATH=$MPI_HOME/lib:$LD_LIBRARY_PATH
31+
export MANPATH=${MPI_HOME}/share/man:$MANPATH
32+
```

0 commit comments

Comments
 (0)