assign worker id to mpi slots