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"); }
private void sendArguments(int operation_tag, int arg1, int arg2, int arg3, IScatter <int> arg4, IScatter <int> arg5, IScatter <int> arg6, ref MPI.RequestList reqList) { int remote_size = channel.RemoteSize; for (int server = 0; server < remote_size; server++) { if (channel.Rank == 0) { channel.Send <int> (operation_tag, server, OPERATION_TAG); } int arg1_ = arg1; int arg2_ = arg2; int arg3_ = arg3; int arg4_ = arg4.Value[server]; int arg5_ = arg5.Value[server]; int arg6_ = arg6.Value[server]; Tuple <int, int, int, int, int, int> send_value = new Tuple <int, int, int, int, int, int> (arg1_, arg2_, arg3_, arg4_, arg5_, arg6_); MPI.Request req = channel.ImmediateSend <Tuple <int, int, int, int, int, int> > (send_value, server, operation_tag); reqList.Add(req); } }