/[MITgcm]/MITgcm/eesupp/inc/EESUPPORT.h
ViewVC logotype

Diff of /MITgcm/eesupp/inc/EESUPPORT.h

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

revision 1.2 by cnh, Thu Apr 23 20:59:35 1998 UTC revision 1.10 by jmc, Tue Apr 21 16:00:53 2009 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    CBOP
4    C     !ROUTINE: EESUPPORT.h
5    C     !INTERFACE:
6    C     include "EESUPPORT.h"
7  C  C
8  C     /==========================================================\  C     !DESCRIPTION:
9    C     *==========================================================*
10  C     | EESUPPORT.h                                              |  C     | EESUPPORT.h                                              |
11  C     |==========================================================|  C     *==========================================================*
12  C     | Support data structures for the MITgcm UV "execution     |  C     | Support data structures for the MITgcm UV ``execution    |
13  C     | environment" code. This data should be private to the    |  C     | environment'' code. This data should be private to the   |
14  C     | execution environment routines. Data which needs to be   |  C     | execution environment routines. Data which needs to be   |
15  C     | accessed directly by the numerical model goes in         |  C     | accessed directly by a numerical model goes in           |
16  C     | EEPARAMS.h.                                              |  C     | EEPARAMS.h.                                              |
17  C     \==========================================================/  C     *==========================================================*
18    CEOP
19    
20  C     ERROR_HEADER        - String which prefixes error messages  C     ERROR_HEADER        - String which prefixes error messages
21        CHARACTER*(*) ERROR_HEADER        CHARACTER*(*) ERROR_HEADER
# Line 17  C     PROCESS_HEADER      - String which Line 24  C     PROCESS_HEADER      - String which
24        CHARACTER*(*) PROCESS_HEADER        CHARACTER*(*) PROCESS_HEADER
25        PARAMETER ( PROCESS_HEADER = 'PID.TID' )        PARAMETER ( PROCESS_HEADER = 'PID.TID' )
26    
27    C     MAX_NUM_COMM_MODES - Maximum number of communication modes
28  C     COMM_NONE       - No edge communication  C     COMM_NONE       - No edge communication
29  C     COMM_MPI        - Use MPI to communicate edges  C     COMM_MSG        - Use messages to communicate edges
30  C     COMM_SHMPG      - Use shm get/put to communicate edges  C     COMM_PUT        - Use put to communicate edges
31  C     COMM_SHARED     - Use true shared memory to communicate edges  C     COMM_GET        - Use get to communicate edges
32    C     Note - commName holds an identifying name for each communication
33    C            mode. The COMM_ parameters are used to index commName
34    C            so the COMM_ parameters need to be in the range
35    C            1 : MAX_NUM_COMM_MODES.
36          INTEGER MAX_NUM_COMM_MODES
37          PARAMETER ( MAX_NUM_COMM_MODES = 4 )
38        INTEGER COMM_NONE        INTEGER COMM_NONE
39        PARAMETER ( COMM_NONE   =   0 )        PARAMETER ( COMM_NONE   =   1 )
40        INTEGER COMM_MPI        INTEGER COMM_MSG
41        PARAMETER ( COMM_MPI    =   1 )        PARAMETER ( COMM_MSG    =   2 )
42        INTEGER COMM_SHMPG        INTEGER COMM_PUT
43        PARAMETER ( COMM_SHMPG  =   2 )        PARAMETER ( COMM_PUT    =   3 )
44        INTEGER COMM_SHARED        INTEGER COMM_GET
45        PARAMETER ( COMM_SHARED =   3 )        PARAMETER ( COMM_GET    =   4 )
46          COMMON /EESUPP_COMMNAME/ commName
47          CHARACTER*10 commName(MAX_NUM_COMM_MODES)
48    
49    C     Tile identifiers
50    C     Tiles have a number that is unique over the global domain.
51    C     A tile that is not there has its number set to NULL_TILE
52          INTEGER NULL_TILE
53          PARAMETER ( NULL_TILE = -1 )
54    
55    
56  C--   COMMON /EESUPP_C/ Execution environment support character variables  C--   COMMON /EESUPP_C/ Execution environment support character variables
57  C     myProcessStr - String identifying my process number  C     myProcessStr - String identifying my process number
# Line 75  C Line 98  C
98        LOGICAL usingSyncMessages        LOGICAL usingSyncMessages
99        LOGICAL notUsingXPeriodicity        LOGICAL notUsingXPeriodicity
100        LOGICAL notUsingYPeriodicity        LOGICAL notUsingYPeriodicity
   
101    
102  C--   COMMON /EESUPP_I/ Parallel support integer globals  C--   COMMON /EESUPP_I/ Parallel support integer globals
103  C     pidW   - "Process" ID of neighbor to West  C     pidW   -  Process  ID of neighbor to West
104  C     pidE   -    "       "       "        East  C     pidE   -           ditto             East
105  C     pidN   -    "       "       "        North  C     pidN   -           ditto             North
106  C     pidS   -    "       "       "        South  C     pidS   -           ditto             South
 C     pidNE  -    "       "       "        North-East  
 C     pidNW  -    "       "       "        North-West  
 C     pidSE  -    "       "       "        South-East  
 C     pidSW  -    "       "       "        South-West  
107  C              Note: pid[XY] is not necessairily the UNIX  C              Note: pid[XY] is not necessairily the UNIX
108  C                    process id - it is just an identifying  C                    process id - it is just an identifying
109  C                    number.  C                    number.
110  C     commW       - Communication method at thread edge to the  C     myPid  - My own process id
111  C     commE         west (W), east (E), south (S), north (N).  C     nProcs - Number of processes
112  C     commS  C     westCommunicationMode  - Mode of communication for each tile face
113  C     commN  C     eastCommunicationMode
114  C     myThrS      - Thread number of neighboring thread, used  C     northCommunicationMode
115  C     myThrN        to match senders with receivers of  C     southCommunicationMode
116  C     myThrW        messages.  C     bi0   - Low cartesian tile index for this process
117  C     myThrE  C     bj0     Note - In a tile distribution with holes bi0 and bj0
118  C     myThrSW  C                    are not useful. Neighboring tile indices must
119  C     myThrSE  C                    be derived some other way.
120  C     myThrNW  C     tileNo       - Tile identification number for my tile and
121  C     myThrNE  C     tileNo[WENS]   my N,S,E,W neighbor tiles.
122  C     nTx, nTy    - No. threads in X and Y. This assumes a simple cartesian  C     tilePid[WENS] - Process identification number for
123  C                   gridding of the threads which is not required elsewhere  C                     my N,S,E,W neighbor tiles.
124  C                   but that makes it easier.  C     nTx, nTy    - No. threads in X and Y. This assumes a simple
125    C                   cartesian gridding of the threads which is not
126    C                   required elsewhere but that makes it easier.
127        COMMON /EESUPP_I/        COMMON /EESUPP_I/
128       & pidW, pidE, pidS, pidN, pidSE, pidSW, pidNE, pidNW,       & myPid, nProcs, pidW, pidE, pidN, pidS,
129       & commW, commN, commS, commE,       & tileCommModeW,  tileCommModeE,
130       & myThrS,  myThrN,  myThrW,  myThrE,       & tileCommModeN,  tileCommModeS,
131       & myThrNE, myThrNW, myThrSE, myThrSW       & tileNo, tileNoW, tileNoE, tileNoS, tileNoN,
132        INTEGER commW(MAX_NO_THREADS)       &  tilePidW, tilePidE, tilePidS, tilePidN,
133        INTEGER commE(MAX_NO_THREADS)       &  tileBiW, tileBiE, tileBiS, tileBiN,
134        INTEGER commN(MAX_NO_THREADS)       & tileBjW, tileBjE, tileBjS, tileBjN,
135        INTEGER commS(MAX_NO_THREADS)       & tileTagSendW, tileTagSendE, tileTagSendS, tileTagSendN,
136         & tileTagRecvW, tileTagRecvE, tileTagRecvS, tileTagRecvN
137          INTEGER myPid
138          INTEGER nProcs
139        INTEGER pidW        INTEGER pidW
140        INTEGER pidE        INTEGER pidE
       INTEGER pidS  
141        INTEGER pidN        INTEGER pidN
142        INTEGER pidSE        INTEGER pidS
143        INTEGER pidSW        INTEGER tileCommModeW ( nSx, nSy )
144        INTEGER pidNE        INTEGER tileCommModeE ( nSx, nSy )
145        INTEGER pidNW        INTEGER tileCommModeN ( nSx, nSy )
146        INTEGER myThrS(MAX_NO_THREADS)        INTEGER tileCommModeS ( nSx, nSy )
147        INTEGER myThrN(MAX_NO_THREADS)        INTEGER tileNo( nSx, nSy )
148        INTEGER myThrW(MAX_NO_THREADS)        INTEGER tileNoW( nSx, nSy )
149        INTEGER myThrE(MAX_NO_THREADS)        INTEGER tileNoE( nSx, nSy )
150        INTEGER myThrSW(MAX_NO_THREADS)        INTEGER tileNoN( nSx, nSy )
151        INTEGER myThrNW(MAX_NO_THREADS)        INTEGER tileNoS( nSx, nSy )
152        INTEGER myThrNE(MAX_NO_THREADS)        INTEGER tilePidW( nSx, nSy )
153        INTEGER myThrSE(MAX_NO_THREADS)        INTEGER tilePidE( nSx, nSy )
154          INTEGER tilePidN( nSx, nSy )
155          INTEGER tilePidS( nSx, nSy )
156          INTEGER tileBiW( nSx, nSy )
157          INTEGER tileBiE( nSx, nSy )
158          INTEGER tileBiN( nSx, nSy )
159          INTEGER tileBiS( nSx, nSy )
160          INTEGER tileBjW( nSx, nSy )
161          INTEGER tileBjE( nSx, nSy )
162          INTEGER tileBjN( nSx, nSy )
163          INTEGER tileBjS( nSx, nSy )
164          INTEGER tileTagSendW( nSx, nSy )
165          INTEGER tileTagSendE( nSx, nSy )
166          INTEGER tileTagSendN( nSx, nSy )
167          INTEGER tileTagSendS( nSx, nSy )
168          INTEGER tileTagRecvW( nSx, nSy )
169          INTEGER tileTagRecvE( nSx, nSy )
170          INTEGER tileTagRecvN( nSx, nSy )
171          INTEGER tileTagRecvS( nSx, nSy )
172    
173  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
174  C--   Include MPI standard Fortran header file  C--   Include MPI standard Fortran header file
# Line 240  C                     threads. Line 280  C                     threads.
280        INTEGER mpiTagE        INTEGER mpiTagE
281        INTEGER mpiTagN        INTEGER mpiTagN
282        INTEGER mpiTagS        INTEGER mpiTagS
 #endif /* ALLOW_USE_MPI */  
283    
284    C--   COMMON /MPI_FULLMAP_I/ holds integer arrays of the full list of MPI process
285    C     mpi_myXGlobalLo :: List of all processors bottom-left X-index in global domain
286    C     mpi_myYGlobalLo :: List of all processors bottom-left Y-index in global domain
287    C                        Note: needed for mpi gather/scatter routines & singleCpuIO.
288          COMMON /MPI_FULLMAP_I/
289         &        mpi_myXGlobalLo, mpi_myYGlobalLo
290          INTEGER mpi_myXGlobalLo(nPx*nPy)
291          INTEGER mpi_myYGlobalLo(nPx*nPy)
292    
293    C MPI communicator describing this model realization
294          COMMON /MPI_COMMS/
295         &        MPI_COMM_MODEL
296          INTEGER MPI_COMM_MODEL
297    
298    #endif /* ALLOW_USE_MPI */

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

  ViewVC Help
Powered by ViewVC 1.1.22