Home:ALL Converter>How to synchronize specific processes in MPI?

How to synchronize specific processes in MPI?

Ask Time:2017-07-27T04:51:38         Author:srcerer

Json Formatter

I am running a parallel code using MPI (written in Python, using MPI module mpi4py). I would like to synchronize a subset of processes within MPI_COMM_WORLD, ideally without creating a new communicator.

The function comm.Barrier() blocks processes until a matching call is made by all processes in the communicator comm. I would like to do the same thing, but only block 2 specific processes within comm. It seems to me that I should be able to synchronize a subset of processes of MPI_COMM_WORLD without creating a new communicator (after all, I can send a message between a subset of processes).

It appears such a task cannot be done by Barrier(). Is there another method I could use to synchronize two specific processes without creating a new communicator?

Author:srcerer,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/45337186/how-to-synchronize-specific-processes-in-mpi
yy