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

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

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

revision 1.3 by jmc, Fri May 15 16:04:22 2009 UTC revision 1.4 by jmc, Fri May 22 00:15:00 2009 UTC
# Line 117  c         ENDDO Line 117  c         ENDDO
117           IF (.TRUE.) THEN           IF (.TRUE.) THEN
118  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
119    
120            iBase = MOD(np0,nPx)            iBase = mpi_myXGlobalLo(np)-1
121            jBase = np0/nPx            jBase = mpi_myYGlobalLo(np)-1
           iBase = iBase*nSx*sNx  
           jBase = jBase*nSy*sNy  
 c         iBase = mpi_myXGlobalLo(np)-1  
 c         jBase = mpi_myYGlobalLo(np)-1  
122    
123            DO bj=1,nSy            DO bj=1,nSy
124             DO bi=1,nSx             DO bi=1,nSx
# Line 142  c         jBase = mpi_myYGlobalLo(np)-1 Line 138  c         jBase = mpi_myYGlobalLo(np)-1
138  C        end if-else useExch2GlobLayOut  C        end if-else useExch2GlobLayOut
139           ENDIF           ENDIF
140    
 C-      end loop on np  
         ENDDO  
   
141  C--   Process 0 sends local arrays to all other processes  C--   Process 0 sends local arrays to all other processes
142           CALL MPI_SEND (temp, lbuff, _MPI_TYPE_RX,           CALL MPI_SEND (temp, lbuff, _MPI_TYPE_RX,
143       &           np0, itag, MPI_COMM_MODEL, ierr)       &           np0, itag, MPI_COMM_MODEL, ierr)
144    
145    C-      end loop on np
146            ENDDO
147    
148        ELSE        ELSE
149    
150  C--   All proceses except 0 receive local array from process 0  C--   All proceses except 0 receive local array from process 0
# Line 213  C     which could be faster if we do les Line 209  C     which could be faster if we do les
209          IF (.TRUE.) THEN          IF (.TRUE.) THEN
210  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
211    
212            iBase = 0            iBase = myXGlobalLo-1
213            jBase = 0            jBase = myYGlobalLo-1
 c         iBase = myXGlobalLo-1  
 c         jBase = myYGlobalLo-1  
214    
215            DO bj=1,nSy            DO bj=1,nSy
216             DO bi=1,nSx             DO bi=1,nSx

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22