【发布时间】:2012-03-17 21:41:11
【问题描述】:
我使用 C 语言的 MPI 库,我想知道是否可以通过不同的进程从代码的不同部分调用 MPI 集体通信方法?
伪例子:
MPI_Rank(&rank,MPI_COMM_WORLD);
switch(rank) {
case 0:
MPI_Bcast(buf1,count, type, 0, comm);
break;
case 1:
MPI_Bcast(buf1,count, type, 0, comm);
break;
case 2:
MPI_Bcast(buf1,count, type, 0, comm);
break;
}
或者它必须从每个进程的同一行代码中调用?
MPI_Bcast(buf1,count, type, 0, comm);
抱歉,我问了一个琐碎的问题,但我用谷歌搜索并没有找到答案。
谢谢!
【问题讨论】: