* @return Time in nanoseconds that it took
*/
private static double send_recv_collective(int msg_size, int repeats) {
byte[] payload = new byte[msg_size];
new Random().nextBytes(payload);
Vec v = Vec.makeConSeq(0., 1); //trivial Vec: 1 element with value 0.
Timer t = new Timer();
for (int l = 0; l < repeats; ++l) {
new CollectiveTask(payload).doAll(v); //same payload for all nodes
}
v.remove(new Futures()).blockForPending();
return (double) t.nanos() / repeats;
}