在http://www.open-mpi.org/上下载最新版Open MPI源代码。
-
配置编译选项 (编译为32位代码)
cd openmpi-1.4.2
./configure CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32
-
编译
make
-
安装
sudo make install
Open MPI将缺省安装在/usr/local/include, /usr/local/bin, /usr/local/lib中。
-
编译并行程序
mpif90/mpif77/mpicc/mpicxx 源文件
-
运行并行程序
mpirun -n 4 执行程序
其中选项 -n 指定计算使用的进程总数。
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00