测试c程序:
# cp /usr/local/mpi/examples/cpi.c .
# mpicc -o cpi cpi.c
# mpirun -np 1 cpi
Process 0 on localhost
pi is approximately 3.1416009869231254, Error is 0.0000083333333323
wall clock time = 0.000284
# mpirun -np 2 cpi
localhost: Connection refused
p0_2409: p4_error: Child process exited while making connection to remote process on localhost: 0
/usr/local/mpi/bin/mpirun: line 1: 2409 断开的管道 /root/cpi -p4pg /root/PI2325 -p4wd /root