计算机仿真原理及应用第五讲重点分析.ppt

单位:物理电子学院 主讲人:王刚 Email: buncan_wang@126.com §5 并行计算与仿真 MPI并行程序设计 MPI编程示例 简单MPI编程示例 #include mpi.h #include stdio.h main(int argc, char **argv) { int num, rk; MPI_Init(argc, argv); MPI_Comm_size(MPI_COMM_WORLD, num); MPI_Comm_rank(MPI_COMM_WORLD, rk); printf(Hello world from Process %d of %d\n,rk,num); MPI_Finalize(); } Hello world from Process 0 of 5 Hello world from Process 1 of 5 Hello world from Process 2 of 5 Hello world from Process 3 of 5 Hello world from Process 4 of 5 MPI并行程序设计 MPI编程示例 消息传递MPI编程示例1 #include

文档评论(0)

1亿VIP精品文档

相关文档