解决:
查看/etc/hosts 的IP地址是否与当前一致。如果不一致,改成一致。
之后在mpich解压包下执行
#mpirun -np 10 ./examples/cpi
出现
Process 0 of 10 is on cluster1
Process 3 of 10 is on cluster1
Process 2 of 10 is on cluster1
Process 8 of 10 is on cluster1
Process 7 of 10 is on cluster1
Process 9 of 10 is on cluster1
Process 5 of 10 is on cluster1
Process 6 of 10 is on cluster1
Process 1 of 10 is on cluster1
Process 4 of 10 is on cluster1
pi is approximately 3.1415926544231256, Error is 0.0000000008333325
说明配置正常。
linux配置mpich环境