65 |
|
|
66 |
C-- Process 0 polls and receives data from each process in turn |
C-- Process 0 polls and receives data from each process in turn |
67 |
DO npe = 1, numberOfProcs-1 |
DO npe = 1, numberOfProcs-1 |
68 |
|
#ifndef DISABLE_MPI_READY_TO_RECEIVE |
69 |
CALL MPI_SEND (ready_to_receive, 1, MPI_INTEGER, |
CALL MPI_SEND (ready_to_receive, 1, MPI_INTEGER, |
70 |
& npe, itag, MPI_COMM_MODEL, ierr) |
& npe, itag, MPI_COMM_MODEL, ierr) |
71 |
|
#endif |
72 |
CALL MPI_RECV (temp, lbuff, MPI_DOUBLE_PRECISION, |
CALL MPI_RECV (temp, lbuff, MPI_DOUBLE_PRECISION, |
73 |
& npe, itag, MPI_COMM_MODEL, istatus, ierr) |
& npe, itag, MPI_COMM_MODEL, istatus, ierr) |
74 |
|
|
89 |
ELSE |
ELSE |
90 |
|
|
91 |
C-- All proceses except 0 wait to be polled then send local array |
C-- All proceses except 0 wait to be polled then send local array |
92 |
|
#ifndef DISABLE_MPI_READY_TO_RECEIVE |
93 |
CALL MPI_RECV (ready_to_receive, 1, MPI_INTEGER, |
CALL MPI_RECV (ready_to_receive, 1, MPI_INTEGER, |
94 |
& idest, itag, MPI_COMM_MODEL, istatus, ierr) |
& idest, itag, MPI_COMM_MODEL, istatus, ierr) |
95 |
|
#endif |
96 |
CALL MPI_SEND (local, lbuff, MPI_DOUBLE_PRECISION, |
CALL MPI_SEND (local, lbuff, MPI_DOUBLE_PRECISION, |
97 |
& idest, itag, MPI_COMM_MODEL, ierr) |
& idest, itag, MPI_COMM_MODEL, ierr) |
98 |
|
|