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

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

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

revision 1.2 by adcroft, Tue May 29 14:01:36 2001 UTC revision 1.3 by cnh, Fri Sep 21 03:55:50 2001 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
5    
6    CBOP
7    
8    C     !ROUTINE: EXCH_Z_RX_CUBE
9    
10    C     !INTERFACE:
11        SUBROUTINE EXCH_Z_RX_CUBE(        SUBROUTINE EXCH_Z_RX_CUBE(
12       U            array,       U            array,
13       I            myOLw, myOLe, myOLn, myOLs, myNz,       I            myOLw, myOLe, myOLn, myOLs, myNz,
14       I            exchWidthX, exchWidthY,       I            exchWidthX, exchWidthY,
15       I            simulationMode, cornerMode, myThid )       I            simulationMode, cornerMode, myThid )
 C     /==========================================================\  
 C     | SUBROUTINE EXCH_Z_RX_CUBE                                |  
 C     | o Control edge exchanges for RX array.                   |  
 C     |==========================================================|  
 C     |                                                          |  
 C     | Controlling routine for exchange of XY edges of an array |  
 C     | distributed in X and Y. The routine interfaces to        |  
 C     | communication routines that can use messages passing     |  
 C     | exchanges, put type exchanges or get type exchanges.     |  
 C     |  This allows anything from MPI to raw memory channel to  |  
 C     | memmap segments to be used as a inter-process and/or     |  
 C     | inter-thread communiation and synchronisation            |  
 C     | mechanism.                                               |  
 C     | Notes --                                                 |  
 C     | 1. Some low-level mechanisms such as raw memory-channel  |  
 C     | or SGI/CRAY shmem put do not have direct Fortran bindings|  
 C     | and are invoked through C stub routines.                 |  
 C     | 2. Although this routine is fairly general but it does   |  
 C     | require nSx and nSy are the same for all innvocations.   |  
 C     | There are many common data structures ( myByLo,          |  
 C     | westCommunicationMode, mpiIdW etc... ) tied in with      |  
 C     | (nSx,nSy). To support arbitray nSx and nSy would require |  
 C     | general forms of these.                                  |  
 C     |                                                          |  
 C     \==========================================================/  
16        IMPLICIT NONE        IMPLICIT NONE
17    C     !DESCRIPTION:
18    C     *==========================================================*
19    C     | SUBROUTINE EXCH_Z_RX_CUBE                                
20    C     | o Control edge exchanges for RX zeta point array on CS    
21    C     *==========================================================*
22    C     |                                                          
23    C     | Controlling routine for exchange of XY edges of an array  
24    C     | distributed in X and Y. The routine interfaces to        
25    C     | communication routines that can use messages passing      
26    C     | exchanges, put type exchanges or get type exchanges.      
27    C     |  This allows anything from MPI to raw memory channel to  
28    C     | memmap segments to be used as a inter-process and/or      
29    C     | inter-thread communiation and synchronisation            
30    C     | mechanism.                                                
31    C     | Notes --                                                  
32    C     | 1. Some low-level mechanisms such as raw memory-channel  
33    C     | or SGI/CRAY shmem put do not have direct Fortran bindings
34    C     | and are invoked through C stub routines.                  
35    C     | 2. Although this routine is fairly general but it does    
36    C     | require nSx and nSy are the same for all innvocations.    
37    C     | There are many common data structures ( myByLo,          
38    C     | westCommunicationMode, mpiIdW etc... ) tied in with      
39    C     | (nSx,nSy). To support arbitray nSx and nSy would require  
40    C     | general forms of these.                                  
41    C     | 3. zeta coord exchange operation for cube sphere grid
42    C     |                                                          
43    C     *==========================================================*
44    
45    C     !USES:
46  C     == Global data ==  C     == Global data ==
47  #include "SIZE.h"  #include "SIZE.h"
48  #include "EEPARAMS.h"  #include "EEPARAMS.h"
49  #include "EESUPPORT.h"  #include "EESUPPORT.h"
50  #include "EXCH.h"  #include "EXCH.h"
51    
52    C     !INPUT/OUTPUT PARAMETERS:
53  C     == Routine arguments ==  C     == Routine arguments ==
54  C     array - Array with edges to exchange.  C     array :: Array with edges to exchange.
55  C     myOLw - West, East, North and South overlap region sizes.  C     myOLw :: West, East, North and South overlap region sizes.
56  C     myOLe  C     myOLe
57  C     myOLn  C     myOLn
58  C     myOLs  C     myOLs
59  C     exchWidthX - Width of data region exchanged in X.  C     exchWidthX :: Width of data region exchanged in X.
60  C     exchWidthY - Width of data region exchanged in Y.  C     exchWidthY :: Width of data region exchanged in Y.
61  C                  Note --  C                   Note --
62  C                  1. In theory one could have a send width and  C                   1. In theory one could have a send width and
63  C                  a receive width for each face of each tile. The only  C                   a receive width for each face of each tile. The only
64  C                  restriction woul be that the send width of one  C                   restriction woul be that the send width of one
65  C                  face should equal the receive width of the sent to  C                   face should equal the receive width of the sent to
66  C                  tile face. Dont know if this would be useful. I  C                   tile face. Dont know if this would be useful. I
67  C                  have left it out for now as it requires additional  C                   have left it out for now as it requires additional
68  C                  bookeeping.  C                   bookeeping.
69  C     simulationMode - Forward or reverse mode exchange ( provides  C     simulationMode :: Forward or reverse mode exchange ( provides
70  C                      support for adjoint integration of code. )  C                       support for adjoint integration of code. )
71  C     cornerMode     - Flag indicating whether corner updates are  C     cornerMode     :: Flag indicating whether corner updates are
72  C                      needed.  C                       needed.
73  C     myThid         - Thread number of this instance of S/R EXCH...  C     myThid         :: Thread number of this instance of S/R EXCH...
74        INTEGER myOLw        INTEGER myOLw
75        INTEGER myOLe        INTEGER myOLe
76        INTEGER myOLs        INTEGER myOLs
# Line 76  C     myThid         - Thread number of Line 85  C     myThid         - Thread number of
85       &          1-myOLs:sNy+myOLn,       &          1-myOLs:sNy+myOLn,
86       &          myNZ, nSx, nSy)       &          myNZ, nSx, nSy)
87    
88    C     !LOCAL VARIABLES:
89  C     == Local variables ==  C     == Local variables ==
90  C     theSimulationMode - Holds working copy of simulation mode  C     theSimulationMode :: Holds working copy of simulation mode
91  C     theCornerMode     - Holds working copy of corner mode  C     theCornerMode     :: Holds working copy of corner mode
92    C     I,J,K,repeat      :: Loop counters and index
93    C     bl,bt,bn,bs,be,bw
94        INTEGER theSimulationMode        INTEGER theSimulationMode
95        INTEGER theCornerMode        INTEGER theCornerMode
96        INTEGER I,J,K,repeat        INTEGER I,J,K,repeat
97        INTEGER bl,bt,bn,bs,be,bw        INTEGER bl,bt,bn,bs,be,bw
   
98  C     == Statement function ==  C     == Statement function ==
99        INTEGER tilemod        INTEGER tilemod
100        tilemod(I)=1+mod(I-1+6,6)        tilemod(I)=1+mod(I-1+6,6)
101    CEOP
102    
103        theSimulationMode = simulationMode        theSimulationMode = simulationMode
104        theCornerMode     = cornerMode        theCornerMode     = cornerMode

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

  ViewVC Help
Powered by ViewVC 1.1.22