call mpi_comm_rank (comm, rank, ierr) call mpi_comm_size (comm, size, ierr) color = 2*rank/size key = size - rank - 1 call mpi_comm_split (comm, color, key, newcomm, ierr)