Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (my_rank < my_size-1)
- {
- /*send top most strip up one node to be recieved as bottom halo*/
- MPI_Isend(&phi[1][0], grid_size , MPI_DOUBLE, down, 1, MPI_COMM_WORLD, &sreqU);
- /*recv top halo from up one node*/
- MPI_Irecv(phi[slice+1][0], grid_size, MPI_DOUBLE, down, 2, MPI_COMM_WORLD, &reqU);
- }
- if (my_rank > 0)
- {
- /*recv top halo from down one node*/
- MPI_Irecv(&phi[0][0], grid_size , MPI_DOUBLE, up, 2, MPI_COMM_WORLD, &reqD);
- /*send bottom most strip down one node to be recieved as top halo*/
- MPI_Isend(&phi[slice][0], grid_size , MPI_DOUBLE, up, 1, MPI_COMM_WORLD, &sreqD);
- }
- printf("send/recieve complete on rank %dn", my_rank);
Add Comment
Please, Sign In to add comment