/[MITgcm]/MITgcm/eesupp/src/exch_rx_recv_get_x.template
ViewVC logotype

Diff of /MITgcm/eesupp/src/exch_rx_recv_get_x.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8 by jmc, Wed Feb 20 20:19:00 2008 UTC revision 1.9 by utke, Tue Mar 18 21:34:01 2008 UTC
# Line 154  C--   iii. Set data read flag + memory s Line 154  C--   iii. Set data read flag + memory s
154           theTag  = _tileTagRecvW(bi,bj)           theTag  = _tileTagRecvW(bi,bj)
155           theType = _MPI_TYPE_RX           theType = _MPI_TYPE_RX
156           theSize = sNy*exchWidthX*myNz           theSize = sNy*exchWidthX*myNz
157    # ifndef ALLOW_AUTODIFF_OPENAD
158           CALL MPI_Recv( westRecvBuf_RX(1,eBl,bi,bj), theSize, theType,           CALL MPI_Recv( westRecvBuf_RX(1,eBl,bi,bj), theSize, theType,
159       &                  theProc, theTag, MPI_COMM_MODEL,       &                  theProc, theTag, MPI_COMM_MODEL,
160       &                  mpiStatus, mpiRc )       &                  mpiStatus, mpiRc )
161    # else
162             CALL ampi_recv_RX(
163         & westRecvBuf_RX(1,eBl,bi,bj) ,
164         & theSize ,
165         & theType ,
166         & theProc ,
167         & theTag ,
168         & MPI_COMM_MODEL ,
169         & mpiStatus ,
170         & mpiRc )
171    # endif /* ALLOW_AUTODIFF_OPENAD */
172  #ifndef ALWAYS_USE_MPI  #ifndef ALWAYS_USE_MPI
173          ENDIF                          ENDIF                
174  #endif  #endif
# Line 171  C--   iii. Set data read flag + memory s Line 183  C--   iii. Set data read flag + memory s
183           theTag  = _tileTagRecvE(bi,bj)           theTag  = _tileTagRecvE(bi,bj)
184           theType = _MPI_TYPE_RX           theType = _MPI_TYPE_RX
185           theSize = sNy*exchWidthX*myNz           theSize = sNy*exchWidthX*myNz
186    # ifndef ALLOW_AUTODIFF_OPENAD
187           CALL MPI_Recv( eastRecvBuf_RX(1,eBl,bi,bj), theSize, theType,           CALL MPI_Recv( eastRecvBuf_RX(1,eBl,bi,bj), theSize, theType,
188       &                  theProc, theTag, MPI_COMM_MODEL,       &                  theProc, theTag, MPI_COMM_MODEL,
189       &                  mpiStatus, mpiRc )       &                  mpiStatus, mpiRc )
190    # else
191             CALL ampi_recv_RX(
192         & eastRecvBuf_RX(1,eBl,bi,bj) ,
193         & theSize ,
194         & theType ,
195         & theProc ,
196         & theTag ,
197         & MPI_COMM_MODEL ,
198         & mpiStatus ,
199         & mpiRc )
200    # endif /* ALLOW_AUTODIFF_OPENAD */
201  #ifndef ALWAYS_USE_MPI  #ifndef ALWAYS_USE_MPI
202          ENDIF                          ENDIF                
203  #endif  #endif
# Line 195  C        i.e. we only lock waiting for d Line 219  C        i.e. we only lock waiting for d
219           ebL = exchangeBufLevel(1,bi,bj)           ebL = exchangeBufLevel(1,bi,bj)
220           westCommMode = _tileCommModeW(bi,bj)           westCommMode = _tileCommModeW(bi,bj)
221           eastCommMode = _tileCommModeE(bi,bj)           eastCommMode = _tileCommModeE(bi,bj)
222    # ifndef ALLOW_AUTODIFF_OPENAD
223     10    CONTINUE     10    CONTINUE
224            CALL FOOL_THE_COMPILER( spinCount )            CALL FOOL_THE_COMPILER( spinCount )
225            spinCount = spinCount+1            spinCount = spinCount+1
# Line 204  C          STOP ' S/R EXCH_RECV_GET_X: s Line 229  C          STOP ' S/R EXCH_RECV_GET_X: s
229  C         ENDIF  C         ENDIF
230            IF ( westRecvAck(eBl,bi,bj) .EQ. 0 ) GOTO 10            IF ( westRecvAck(eBl,bi,bj) .EQ. 0 ) GOTO 10
231            IF ( eastRecvAck(eBl,bi,bj) .EQ. 0 ) GOTO 10            IF ( eastRecvAck(eBl,bi,bj) .EQ. 0 ) GOTO 10
232    # else
233             do while ((westRecvAck(eBl,bi,bj) .EQ. 0.
234         &             .or.
235         &              eastRecvAck(eBl,bi,bj) .EQ. 0. ))
236              CALL FOOL_THE_COMPILER( spinCount )
237              spinCount = spinCount+1
238             end do
239    # endif /* ALLOW_AUTODIFF_OPENAD */
240  C        Clear outstanding requests  C        Clear outstanding requests
241           westRecvAck(eBl,bi,bj) = 0           westRecvAck(eBl,bi,bj) = 0
242           eastRecvAck(eBl,bi,bj) = 0           eastRecvAck(eBl,bi,bj) = 0
# Line 213  C        Clear outstanding requests Line 246  C        Clear outstanding requests
246  #ifndef ALWAYS_USE_MPI  #ifndef ALWAYS_USE_MPI
247           IF ( usingMPI ) THEN           IF ( usingMPI ) THEN
248  #endif  #endif
249    # ifndef ALLOW_AUTODIFF_OPENAD
250            CALL MPI_Waitall( exchNReqsX(1,bi,bj), exchReqIdX(1,1,bi,bj),            CALL MPI_Waitall( exchNReqsX(1,bi,bj), exchReqIdX(1,1,bi,bj),
251       &                      mpiStatus, mpiRC )       &                      mpiStatus, mpiRC )
252    # else
253              CALL ampi_waitall(
254         & exchNReqsX(1,bi,bj),
255         & exchReqIdX(1,1,bi,bj),
256         & mpiStatus,
257         & mpiRC )
258    # endif /* ALLOW_AUTODIFF_OPENAD */
259  #ifndef ALWAYS_USE_MPI  #ifndef ALWAYS_USE_MPI
260          ENDIF                          ENDIF                
261  #endif  #endif

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22