【发布时间】:2013-07-09 11:05:51
【问题描述】:
我有一个主节点,它经常使用 MPI_Bcast 广播一条消息。问题是,我有一个特定节点需要比其他节点运行得慢一些,并且说它只会参与 bcast 一半的时间。就像这样:
// -- iteration 1
Master: MPI_Bcast(msg1)
Node1: MPI_Bcast(msg1)
Node2: MPI_Bcast(msg1)
Node0: MPI_Bcast(msg1)
// -- iteration 2
Master: MPI_Bcast(msg2)
Node1: MPI_Bcast(msg2)
Node2: MPI_Bcast(msg2)
Node0: DoSomethingImportantAndDontParticipateInBcast()
// -- iteration 3
Master: MPI_Bcast(msg3)
Node1: MPI_Bcast(msg3)
Node2: MPI_Bcast(msg3)
Node0: MPI_Bcast(msg3)
这可能吗?请注意,在最后一次迭代中,我希望 Node0 接收 msg3 而不是 msg2(它被忽略了)。
【问题讨论】:
-
send 和 broadcast 在 MPI 中表示不同的东西,有多种类型的 send。请解释更多。
-
@HighPerformanceMark 我已经更新了这个问题。谢谢。 tbh,我不确定我是否完全理解 MPI 中的广播,所以如果我遗漏了什么,请告诉我(我希望我没有)
-
这是一个错误的程序。 MPI 集体必须被集体调用。故事结束。
标签: mpi