MPI是常用的并行编程库,可以安装openmpi或mpich来获得mpi的API。
learn_mpi
|
|
结果
执行mpirun -n 4 learn_mpi得到123456number of process = 4hello mpi from process 0hello mpi from process 1hello mpi from process 2hello mpi from process 3Time elapsed = 4.0020095184445381E-006 seconds.