next up previous
Next: Scattering particles Up: Particle migration Previous: Creating the send and

Communicating the data


Communicating the Data

int dir=0, disp=1, source, dest, rcount;
MPI_Status cstatus;

ierr = MPI_Cart_shift (comm3d, dir, disp, 
                       source, dest);

ierr = MPI_Sendrecv(
          particle, 1, Sendtype, dest, 0,
          &particle[npart], space, Ptype, 
          source, 0, comm3d, &cstatus);

ierr = MPI_Get_count (&cstatus, Ptype, &rcount);

REPACK PARTICLE ARRAY



David W Walker
Mon Jan 20 11:10:22 GMT 1997