61 |
|
|
62 |
C-- Process 0 polls and receives data from each process in turn |
C-- Process 0 polls and receives data from each process in turn |
63 |
DO npe = 1, numberOfProcs-1 |
DO npe = 1, numberOfProcs-1 |
64 |
|
#ifndef DISABLE_MPI_READY_TO_RECEIVE |
65 |
CALL MPI_SEND (ready_to_receive, 1, MPI_INTEGER, |
CALL MPI_SEND (ready_to_receive, 1, MPI_INTEGER, |
66 |
& npe, itag, MPI_COMM_MODEL, ierr) |
& npe, itag, MPI_COMM_MODEL, ierr) |
67 |
|
#endif |
68 |
CALL MPI_RECV (temp, lbuff, MPI_DOUBLE_PRECISION, |
CALL MPI_RECV (temp, lbuff, MPI_DOUBLE_PRECISION, |
69 |
& npe, itag, MPI_COMM_MODEL, istatus, ierr) |
& npe, itag, MPI_COMM_MODEL, istatus, ierr) |
70 |
|
|
82 |
ELSE |
ELSE |
83 |
|
|
84 |
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 |
85 |
|
#ifndef DISABLE_MPI_READY_TO_RECEIVE |
86 |
CALL MPI_RECV (ready_to_receive, 1, MPI_INTEGER, |
CALL MPI_RECV (ready_to_receive, 1, MPI_INTEGER, |
87 |
& idest, itag, MPI_COMM_MODEL, istatus, ierr) |
& idest, itag, MPI_COMM_MODEL, istatus, ierr) |
88 |
|
#endif |
89 |
CALL MPI_SEND (local, lbuff, MPI_DOUBLE_PRECISION, |
CALL MPI_SEND (local, lbuff, MPI_DOUBLE_PRECISION, |
90 |
& idest, itag, MPI_COMM_MODEL, ierr) |
& idest, itag, MPI_COMM_MODEL, ierr) |
91 |
|
|