阻塞 MPI_Scatter 死锁
在 W. Gropp 等人的《Using Advanced MPI》一书中。 (有关非阻塞集体的第 19 页)内容如下:
“由于循环匹配顺序依赖性,所有四个通信器同时进行的任何阻塞集体操作都会导致死锁......”
根据书中的说法,这段代码会死锁:
MPI_Comm comm[5]= {c_my, c_north, c_south, c_east, c_west}
for (i=0; i<5; ++i) {
MPI_Scatter(sbf[i], ct, dt, rbf[i], ct, dt, 0, comm[i]);
}
我知道 MPI_Scatter 是一个阻塞操作,因此当第一次迭代 (i=0) MPI_Scatter 被称为它之后阻塞,并且只有当它完成时,程序流程才会继续,并且执行下一次迭代,而不会产生死锁。
我想我错过了什么?谢谢。
in the book Using Advanced MPI by W. Gropp et al. (page 19 on Non-blocking Collectives) it reads:
"Any blocking collective operation on all four communicators at the same time would lead to a deadlock because of the cyclic matching ordering dependency ..."
According to the book this code would deadlock:
MPI_Comm comm[5]= {c_my, c_north, c_south, c_east, c_west}
for (i=0; i<5; ++i) {
MPI_Scatter(sbf[i], ct, dt, rbf[i], ct, dt, 0, comm[i]);
}
I understood that MPI_Scatter is a blocking operation, thus when in the first iteration (i=0) MPI_Scatter is called it blocks afterward, and only when it is done the program's flow continues and the next iteration is executed without creating a deadlock.
I guess I am missing something? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论