private void receiveResult <T> (ref MPI.RequestList reqList, int operation_tag) { int remote_size = channel.RemoteSize; for (int server = 0; server < remote_size; server++) { MPI.Request req = channel.ImmediateReceive <T> (server, operation_tag); reqList.Add(req); } }
public void invoke(object action_id) { int partner_size = channel.RemoteSize; int value = ActionDef.action_ids[action_id]; MPI.RequestList request_list = new MPI.RequestList(); for (int i = 0; i < partner_size; i++) { MPI.Request req = channel.ImmediateSend <object>(value, i, value); request_list.Add(req); } for (int i = 0; i < partner_size; i++) { MPI.ReceiveRequest req = channel.ImmediateReceive <object>(i, value); request_list.Add(req); } Console.WriteLine(channel.Rank + ": BEFORE WAIT ALL"); request_list.WaitAll(); Console.WriteLine(channel.Rank + ": AFTER WAIT ALL"); }