【正文】
MPI_MAX_PROCESSOR_NAME]。 7. MPI_Init(amp。argc, amp。argv)。 // Initialize the MPI environment 8. // Get the size of process in the current process group 9. MPI_Comm_size( MPI_COMM_WORLD, amp。numprocs )。 10. // Get the rank of the current process 11. MPI_Comm_rank( MPI_COMM_WORLD, amp。myid )。 12. // Get the name of the processor which is running this process 13. MPI_Get_processor_name(processor_name, amp。namelen)。 14. // Say hello world 15. printf(Hello World! Process %d of %d on %s\n, myid, numprocs, 16. processor_name)。 17. MPI_Finalize()。 // Exit the MPI environment 18. return 0。 19.} 執(zhí)行過程