/[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.2 by cnh, Fri Sep 21 03:55:50 2001 UTC revision 1.5 by cnh, Mon Nov 7 19:03:36 2005 UTC
# Line 81  C                                   tile Line 81  C                                   tile
81  #endif  #endif
82  CEOP  CEOP
83    
84    #ifdef USE_SINGLE_THREADED_EXCH_COMMS
85           INTEGER myBxLoSave(MAX_NO_THREADS)
86           INTEGER myBxHiSave(MAX_NO_THREADS)
87           INTEGER myByLoSave(MAX_NO_THREADS)
88           INTEGER myByHiSave(MAX_NO_THREADS)
89    #endif /* SINGLE_THREADED_EXCH_COMMS */
90    
91    #ifdef USE_SINGLE_THREADED_EXCH_COMMS
92          _BARRIER
93          IF ( myThid .EQ. 1 ) THEN
94           DO I=1,nThreads
95            myBxLoSave(I) = myBxLo(I)
96            myBxHiSave(I) = myBxHi(I)
97            myByLoSave(I) = myByLo(I)
98            myByHiSave(I) = myByHi(I)
99            myBxLo(I) = 0
100            myBxHi(I) = -1
101            myByLo(I) = 0
102            myByHi(I) = -1
103           ENDDO
104           myBxLo(1) = 1
105           myBxHi(1) = nSx
106           myByLo(1) = 1
107           myByHi(1) = nSy
108          ENDIF
109          _BARRIER
110    #endif /* SINGLE_THREADED_EXCH_COMMS */
111    
112    
113  C--   Under a "put" scenario we  C--   Under a "put" scenario we
114  C--     i. set completetion signal for buffer we put into.  C--     i. set completetion signal for buffer we put into.
# Line 109  C--   iii. Set data read flag + memory s Line 137  C--   iii. Set data read flag + memory s
137  #endif  #endif
138           theProc = tilePidW(bi,bj)           theProc = tilePidW(bi,bj)
139           theTag  = _tileTagRecvW(bi,bj)           theTag  = _tileTagRecvW(bi,bj)
140           theType = MPI_DOUBLE_PRECISION           theType = _MPI_TYPE_RX
141           theSize = sNy*exchWidthX*myNz           theSize = sNy*exchWidthX*myNz
142           CALL MPI_Recv( westRecvBuf_RX(1,eBl,bi,bj), theSize, theType,           CALL MPI_Recv( westRecvBuf_RX(1,eBl,bi,bj), theSize, theType,
143       &                  theProc, theTag, MPI_COMM_MODEL,       &                  theProc, theTag, MPI_COMM_MODEL,
# Line 126  C--   iii. Set data read flag + memory s Line 154  C--   iii. Set data read flag + memory s
154  #endif  #endif
155           theProc = tilePidE(bi,bj)           theProc = tilePidE(bi,bj)
156           theTag  = _tileTagRecvE(bi,bj)           theTag  = _tileTagRecvE(bi,bj)
157           theType = MPI_DOUBLE_PRECISION           theType = _MPI_TYPE_RX
158           theSize = sNy*exchWidthX*myNz           theSize = sNy*exchWidthX*myNz
159           CALL MPI_Recv( eastRecvBuf_RX(1,eBl,bi,bj), theSize, theType,           CALL MPI_Recv( eastRecvBuf_RX(1,eBl,bi,bj), theSize, theType,
160       &                  theProc, theTag, MPI_COMM_MODEL,       &                  theProc, theTag, MPI_COMM_MODEL,
# Line 153  C        i.e. we only lock waiting for d Line 181  C        i.e. we only lock waiting for d
181           westCommMode = _tileCommModeW(bi,bj)           westCommMode = _tileCommModeW(bi,bj)
182           eastCommMode = _tileCommModeE(bi,bj)           eastCommMode = _tileCommModeE(bi,bj)
183     10    CONTINUE     10    CONTINUE
184            CALL FOOL_THE_COMPILER            CALL FOOL_THE_COMPILER( spinCount )
185            spinCount = spinCount+1            spinCount = spinCount+1
186  C         IF ( myThid .EQ. 1 .AND. spinCount .GT. _EXCH_SPIN_LIMIT ) THEN  C         IF ( myThid .EQ. 1 .AND. spinCount .GT. _EXCH_SPIN_LIMIT ) THEN
187  C          WRITE(*,*) ' eBl = ', ebl  C          WRITE(*,*) ' eBl = ', ebl
# Line 318  C--   Read from the buffers Line 346  C--   Read from the buffers
346         ENDDO         ENDDO
347        ENDDO        ENDDO
348    
349    #ifdef USE_SINGLE_THREADED_EXCH_COMMS
350          _BARRIER
351          IF ( myThid .EQ. 1 ) THEN
352           DO I=1,nThreads
353            myBxLo(I) = myBxLoSave(I)
354            myBxHi(I) = myBxHiSave(I)
355            myByLo(I) = myByLoSave(I)
356            myByHi(I) = myByHiSave(I)
357           ENDDO
358          ENDIF
359          _BARRIER
360    #endif /* USE_SINGLE_THREADED_EXCH_COMMS */
361    
362        RETURN        RETURN
363        END        END

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22