public override int go() { int i, j, ny2; ny2 = ny + 2; if (jfin1 == ny) { double[] dum = new double[2 * nx]; MPI.Request msgid3 = worldcomm.ImmediateReceive <double>(east, from_e, dum); msgid3.Wait(); for (i = 1; i <= nx; i++) { g[ny + 1, i] = dum[i - 1]; h[ny + 1, i] = dum[i + nx - 1]; } } if (jbeg == 1) { double[] dum; dum = new double[2 * nx]; for (i = 1; i <= nx; i++) { dum[i - 1] = g[1, i]; dum[i + nx - 1] = h[1, i]; } worldcomm.Send <double>(dum, west, from_e); } if (ifin1 == nx) { double[] dum; dum = new double[2 * ny2]; MPI.Request msgid1 = worldcomm.ImmediateReceive <double>(south, from_s, dum); msgid1.Wait(); for (j = 0; j <= ny + 1; j++) { g[j, nx + 1] = dum[j]; h[j, nx + 1] = dum[j + ny2]; } } if (ibeg == 1) { double[] dum; dum = new double[2 * ny2]; for (j = 0; j <= ny + 1; j++) { dum[j] = g[j, 1]; dum[j + ny2] = h[j, 1]; } worldcomm.Send <double>(dum, north, from_s); } return(0); }
public br.ufc.mdcc.hpc.storm.binding.channel.Binding.Request ImmediateSend <T> (T[] values, Tuple <int, int> dest, int tag) { //int conversation_tag = takeNextConversationTag(); Console.WriteLine(this.PeerRank + ": CHECKING " + this.RootCommunicator.Rank + "," + dest.Item2); Console.WriteLine(this.PeerRank + ": 1 - BEGIN SEND TO <" + dest.Item1 + "," + dest.Item2 + "> : " + TAG_SEND_OPERATION); this.RootCommunicator.Send <Tuple <int, int> >(new Tuple <int, int>(AliencommunicatorOperation.SEND_ARRAY, tag), 0, TAG_SEND_OPERATION); Console.WriteLine(this.PeerRank + ": 2 - BEGIN SEND TO <" + dest.Item1 + "," + dest.Item2 + "> : " + tag); byte[] value_packet = ObjectToByteArray(values); MPI.Request root_request = this.RootCommunicator.ImmediateSend <Tuple <int, int, int, byte[]> > (new Tuple <int, int, int, byte[]>(dest.Item1, dest.Item2, tag, value_packet), 0, tag); Console.WriteLine(this.PeerRank + ": 3 - END SEND TO <" + dest.Item1 + "," + dest.Item2 + ">"); return(br.ufc.mdcc.hpc.storm.binding.channel.Binding.Request.createRequest(root_request, dest)); }
public static Request createRequest(MPI.Request internal_status, Tuple <int, int> source) { return(new Request(internal_status, source)); }
internal Request(MPI.Request internal_request, Tuple <int, int> source) { this.internal_request = internal_request; this.source = source; }