mpi split communicator code example
Example: mpi split communicator
int MPI_Comm_split(
MPI_Comm comm,
int color, // int representing the group, one different for each group
int key, // int representing the rank of the current proc in the new group
MPI_Comm *newcomm // output param
);