How is barrier implemented in message passing systems?

前端 未结 2 1982
难免孤独
难免孤独 2021-02-08 19:41

What I understand is, that one master process sends a message to all other processes. All the other processes in return send a message to the master process. Would this be enoug

2条回答
  •  忘掉有多难
    2021-02-08 20:10

    No, that's not enough. Once the master process has sent a message to all other processes informing them that it has reached the barrier, and all other processes have responded to say that they too have reached the barrier, only the master process knows that all processes have reached the barrier. In this scenario another message from the master to the other processes would be necessary.

    I make no claim about the actual implementation of MPI barriers in any library, in particular I am not suggesting that the sequence of messages outlined is used in practice, just that it is deficient in theory.

提交回复
热议问题