Is there any way to add a barrier in MPI code.
By barrier I mean, I want all the different processors to first finish till a point and then carry on from there. That is a processor must wait for the other processors to finish the code till that region and then only proceed to the remaining part of the code.
For Example,
int main()
{
.
.
.
//I want all my processors to do till this and
wait for other processers to complete till this point,
and then resume the remaining part
.
.
.
}
Is there any way to do this in MPIch?