33 |
INTEGER myThid, I, J, II |
INTEGER myThid, I, J, II |
34 |
INTEGER iErr, tNx, tNy |
INTEGER iErr, tNx, tNy |
35 |
INTEGER pRank |
INTEGER pRank |
36 |
|
INTEGER npe,itemp(nSx),istatus(MPI_STATUS_SIZE) |
37 |
|
INTEGER mpiBufSize,mpiRequest |
38 |
|
|
39 |
C Set dummy myThid value (we aren't multi-threaded here) |
C Set dummy myThid value (we aren't multi-threaded here) |
40 |
myThid = 1 |
myThid = 1 |
42 |
C Define toplogy for every tile |
C Define toplogy for every tile |
43 |
CALL W2_E2SETUP |
CALL W2_E2SETUP |
44 |
|
|
45 |
C Decide which tiles this process handles - do this inline for now, but |
C Decide which tiles this process handles - do this inline for now, but |
46 |
C should go in subroutine. |
C should go in subroutine. |
47 |
C Total number of tiles should be divisible by nPx and nSx |
C Total number of tiles should be divisible by nPx and nSx |
48 |
C ( there is no two dimensional decomposition for W2 ) and |
C ( there is no two dimensional decomposition for W2 ) and |
144 |
W2_myCommFlag(J,I) = commFlag |
W2_myCommFlag(J,I) = commFlag |
145 |
ENDDO |
ENDDO |
146 |
ENDDO |
ENDDO |
147 |
C |
|
148 |
|
C Fill in values for W2_mpi_myTileList |
149 |
|
#ifdef ALLOW_USE_MPI |
150 |
|
mpiBufSize=nSx |
151 |
|
mpiRequest=0 |
152 |
|
DO npe = 0, numberOfProcs-1 |
153 |
|
CALL MPI_ISEND (W2_myTileList, mpiBufSize, MPI_INTEGER, |
154 |
|
& npe, mpiMyId, MPI_COMM_MODEL, mpiRequest, ierr) |
155 |
|
ENDDO |
156 |
|
DO npe = 0, numberOfProcs-1 |
157 |
|
CALL MPI_RECV (itemp, mpiBufSize, MPI_INTEGER, |
158 |
|
& npe, npe, MPI_COMM_MODEL, istatus, ierr) |
159 |
|
DO I=1,nSx |
160 |
|
W2_mpi_myTileList(npe+1,I)=itemp(I) |
161 |
|
ENDDO |
162 |
|
ENDDO |
163 |
|
#else /* ALLOW_USE_MPI */ |
164 |
|
DO I=1,nSx |
165 |
|
W2_mpi_myTileList(1,I)=W2_myTileList(I) |
166 |
|
ENDDO |
167 |
|
#endif /* ALLOW_USE_MPI */ |
168 |
|
|
169 |
C Print out the topology communication schedule |
C Print out the topology communication schedule |
170 |
CALL W2_PRINT_COMM_SEQUENCE |
CALL W2_PRINT_COMM_SEQUENCE |
171 |
C |
C |