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