Guest User

Untitled

a guest
Jan 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. if (my_rank < my_size-1)
  2. {
  3. /*send top most strip up one node to be recieved as bottom halo*/
  4. MPI_Isend(&phi[1][0], grid_size , MPI_DOUBLE, down, 1, MPI_COMM_WORLD, &sreqU);
  5. /*recv top halo from up one node*/
  6. MPI_Irecv(phi[slice+1][0], grid_size, MPI_DOUBLE, down, 2, MPI_COMM_WORLD, &reqU);
  7. }
  8.  
  9. if (my_rank > 0)
  10. {
  11. /*recv top halo from down one node*/
  12. MPI_Irecv(&phi[0][0], grid_size , MPI_DOUBLE, up, 2, MPI_COMM_WORLD, &reqD);
  13. /*send bottom most strip down one node to be recieved as top halo*/
  14. MPI_Isend(&phi[slice][0], grid_size , MPI_DOUBLE, up, 1, MPI_COMM_WORLD, &sreqD);
  15. }
  16.  
  17. printf("send/recieve complete on rank %dn", my_rank);
Add Comment
Please, Sign In to add comment