1. 前提
ssh打通
2. Make
–./configure
--with-devel-headers--with-slurm
–make && make install
•Config (~/.bashrc)
»export
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/openmpi/:$LD_LIBRARY_PATH
»export PATH=.:/usr/local/bin:$PATH
3. Test
•cd soft/openmpi-1.6.1/examples
•Make/mpicc –o hellohello_c.c
•Mpirun –np 2 hello
•mpicc–o hellohello_c.c
•mpirun–np 2 hello
•mpirun–np 8 --hostfilemachinefilehello
–machinefile
»node001 slots=2
»node002 slots=1
4.
[caoj7@vm1 mpi]$ mpirun -np 20 -hostfile machinefile -bynode hello
[caoj7@vm1 mpi]$ mpirun -np 20 -hostfile machinefile -byslot hello
本文详细介绍了如何安装OpenMPI,包括前提条件——确保ssh连接畅通,配置Make过程,环境变量设置,以及安装后的测试步骤,如运行示例程序验证多进程并行通信功能。
8141

被折叠的 条评论
为什么被折叠?



