On Dec 28, 2006, at 5:25 AM, Rajesh vanaparthi wrote:
> can any one explain the difference between these two statements
>
> MPI_Comm_split(MPI_COMM_WORLD,rank==0,0,&new_comm);
> and
> MPI_Comm_split(MPI_COMM_WORLD,0,0,&new_comm);
>
> new_comm is a communicator
The second argument to MPI_COMM_SPLIT, the color, determines the
number of new communicators created and which ranks of the old
communicator are in which new communicators. The first command will
create two new communicators, one containing rank 0 of the original
communicator and one containing all other ranks in the original
communicator. The second call has the same value for color on all
ranks, so it is essentially the same as a call to MPI_COMM_DUP.
Hope this helps,
Brian
--
Brian Barrett
LAM/MPI developer and all around nice guy
Have a LAM/MPI day: http://www.lam-mpi.org/
|