All pastes #935276 Raw Edit

Stuff

public text v1 · immutable
·published 2008-03-09 14:50 UTC
rendered paste body
/* Split current communicator in half */
myColor = myid >= (size / 2);
newComm = comm.Split(myColor, 0);

/* Create intercommunicators over the gap */
peerid = myColor ? (myid - size / 2) : (myid + size / 2);
interComm = newComm.Create_intercomm(0, comm, peerid, 1);