tkwant.mpi.round_robin

tkwant.mpi.round_robin(comm, key)[source]

Schedule integer keys in a round robin fashion to the MPI ranks.

commmpi4py.MPI.Intracomm

The MPI communicator.

keyint

Integer key.

Returns

runrun is true if rank == key + m * size , where m is an arbitrary integer, and size and rank correspond to the MPI size and rank.

Return type

bool