/[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.1 by cnh, Wed Apr 22 19:15:30 1998 UTC revision 1.6 by cnh, Sun Feb 4 14:38:41 2001 UTC
# Line 1  Line 1 
1  C $Id$  C $Header$
2    C $Name$
3  C  C
4  C     /==========================================================\  C     /==========================================================\
5  C     | EESUPPORT.h                                              |  C     | EESUPPORT.h                                              |
# Line 17  C     PROCESS_HEADER      - String which Line 18  C     PROCESS_HEADER      - String which
18        CHARACTER*(*) PROCESS_HEADER        CHARACTER*(*) PROCESS_HEADER
19        PARAMETER ( PROCESS_HEADER = 'PID.TID' )        PARAMETER ( PROCESS_HEADER = 'PID.TID' )
20    
21    C     MAX_NUM_COMM_MODES - Maximum number of communication modes
22  C     COMM_NONE       - No edge communication  C     COMM_NONE       - No edge communication
23  C     COMM_MPI        - Use MPI to communicate edges  C     COMM_MSG        - Use messages to communicate edges
24  C     COMM_SHMPG      - Use shm get/put to communicate edges  C     COMM_PUT        - Use put to communicate edges
25  C     COMM_SHARED     - Use true shared memory to communicate edges  C     COMM_GET        - Use get to communicate edges
26    C     Note - commName holds an identifying name for each communication
27    C            mode. The COMM_ parameters are used to index commName
28    C            so the COMM_ parameters need to be in the range
29    C            1 : MAX_NUM_COMM_MODES.
30          INTEGER MAX_NUM_COMM_MODES
31          PARAMETER ( MAX_NUM_COMM_MODES = 4 )
32        INTEGER COMM_NONE        INTEGER COMM_NONE
33        PARAMETER ( COMM_NONE   =   0 )        PARAMETER ( COMM_NONE   =   1 )
34        INTEGER COMM_MPI        INTEGER COMM_MSG
35        PARAMETER ( COMM_MPI    =   1 )        PARAMETER ( COMM_MSG    =   2 )
36        INTEGER COMM_SHMPG        INTEGER COMM_PUT
37        PARAMETER ( COMM_SHMPG  =   2 )        PARAMETER ( COMM_PUT    =   3 )
38        INTEGER COMM_SHARED        INTEGER COMM_GET
39        PARAMETER ( COMM_SHARED =   3 )        PARAMETER ( COMM_GET    =   4 )
40          COMMON /EESUPP_COMMNAME/ commName
41          CHARACTER*10 commName(MAX_NUM_COMM_MODES)
42    
43    C     Tile identifiers
44    C     Tiles have a number that is unique over the global domain.
45    C     A tile that is not there has its number set to NULL_TILE
46          INTEGER NULL_TILE
47          PARAMETER ( NULL_TILE = -1 )
48    
49    
50  C--   COMMON /EESUPP_C/ Execution environment support character variables  C--   COMMON /EESUPP_C/ Execution environment support character variables
51  C     myProcessStr - String identifying my process number  C     myProcessStr - String identifying my process number
# Line 64  C Line 81  C
81  C                                         the main.F master loop. This should not happen  C                                         the main.F master loop. This should not happen
82  C                                         if the multi-threading compilation tools works right.  C                                         if the multi-threading compilation tools works right.
83  C                                         But (see for example KAP) this is not always the case!  C                                         But (see for example KAP) this is not always the case!
84    C     printMapIncludesZeros - Flag that controls whether character constant map code ignores
85    C                             exact zero values.
86        COMMON /EESUPP_L/ thError, threadIsRunning, threadIsComplete,        COMMON /EESUPP_L/ thError, threadIsRunning, threadIsComplete,
87       & allMyEdgesAreSharedMemory, usingMPI, usingSyncMessages,       & allMyEdgesAreSharedMemory, usingMPI, usingSyncMessages,
88       & notUsingXPeriodicity, notUsingYPeriodicity       & notUsingXPeriodicity, notUsingYPeriodicity,
89         & printMapIncludesZeros
90        LOGICAL thError(MAX_NO_THREADS)        LOGICAL thError(MAX_NO_THREADS)
91        LOGICAL threadIsRunning(MAX_NO_THREADS)        LOGICAL threadIsRunning(MAX_NO_THREADS)
92        LOGICAL threadIsComplete(MAX_NO_THREADS)        LOGICAL threadIsComplete(MAX_NO_THREADS)
# Line 75  C Line 95  C
95        LOGICAL usingSyncMessages        LOGICAL usingSyncMessages
96        LOGICAL notUsingXPeriodicity        LOGICAL notUsingXPeriodicity
97        LOGICAL notUsingYPeriodicity        LOGICAL notUsingYPeriodicity
98          LOGICAL printMapIncludesZeros
99    
   
100  C--   COMMON /EESUPP_I/ Parallel support integer globals  C--   COMMON /EESUPP_I/ Parallel support integer globals
101  C     pidW   - "Process" ID of neighbor to West  C     pidW   -  Process  ID of neighbor to West
102  C     pidE   -    "       "       "        East  C     pidE   -           ditto             East
103  C     pidN   -    "       "       "        North  C     pidN   -           ditto             North
104  C     pidS   -    "       "       "        South  C     pidS   -           ditto             South
 C     pidNE  -    "       "       "        North-East  
 C     pidNW  -    "       "       "        North-West  
 C     pidSE  -    "       "       "        South-East  
 C     pidSW  -    "       "       "        South-West  
105  C              Note: pid[XY] is not necessairily the UNIX  C              Note: pid[XY] is not necessairily the UNIX
106  C                    process id - it is just an identifying  C                    process id - it is just an identifying
107  C                    number.  C                    number.
108  C     commW       - Communication method at thread edge to the  C     myPid  - My own process id
109  C     commE         west (W), east (E), south (S), north (N).  C     nProcs - Number of processes
110  C     commS  C     westCommunicationMode  - Mode of communication for each tile face
111  C     commN  C     eastCommunicationMode
112  C     myThrS      - Thread number of neighboring thread, used  C     northCommunicationMode
113  C     myThrN        to match senders with receivers of  C     southCommunicationMode
114  C     myThrW        messages.  C     bi0   - Low cartesian tile index for this process
115  C     myThrE  C     bj0     Note - In a tile distribution with holes bi0 and bj0
116  C     myThrSW  C                    are not useful. Neighboring tile indices must
117  C     myThrSE  C                    be derived some other way.
118  C     myThrNW  C     tileNo       - Tile identification number for my tile and
119  C     myThrNE  C     tileNo[WENS]   my N,S,E,W neighbor tiles.
120  C     nTx, nTy    - No. threads in X and Y. This assumes a simple cartesian  C     tilePid[WENS] - Process identification number for
121  C                   gridding of the threads which is not required elsewhere  C                     my N,S,E,W neighbor tiles.
122  C                   but that makes it easier.  C     nTx, nTy    - No. threads in X and Y. This assumes a simple
123    C                   cartesian gridding of the threads which is not
124    C                   required elsewhere but that makes it easier.
125        COMMON /EESUPP_I/        COMMON /EESUPP_I/
126       & pidW, pidE, pidS, pidN, pidSE, pidSW, pidNE, pidNW,       & myPid, nProcs, pidW, pidE, pidN, pidS,
127       & commW, commN, commS, commE,       & tileCommModeW,  tileCommModeE,
128       & myThrS,  myThrN,  myThrW,  myThrE,       & tileCommModeN,  tileCommModeS,
129       & myThrNE, myThrNW, myThrSE, myThrSW       & tileNo, tileNoW, tileNoE, tileNoS, tileNoN,
130        INTEGER commW(MAX_NO_THREADS)       &  tilePidW, tilePidE, tilePidS, tilePidN,
131        INTEGER commE(MAX_NO_THREADS)       &  tileBiW, tileBiE, tileBiS, tileBiN,
132        INTEGER commN(MAX_NO_THREADS)       & tileBjW, tileBjE, tileBjS, tileBjN,
133        INTEGER commS(MAX_NO_THREADS)       & tileTagSendW, tileTagSendE, tileTagSendS, tileTagSendN,
134         & tileTagRecvW, tileTagRecvE, tileTagRecvS, tileTagRecvN
135          INTEGER myPid
136          INTEGER nProcs
137        INTEGER pidW        INTEGER pidW
138        INTEGER pidE        INTEGER pidE
       INTEGER pidS  
139        INTEGER pidN        INTEGER pidN
140        INTEGER pidSE        INTEGER pidS
141        INTEGER pidSW        INTEGER tileCommModeW ( nSx, nSy )
142        INTEGER pidNE        INTEGER tileCommModeE ( nSx, nSy )
143        INTEGER pidNW        INTEGER tileCommModeN ( nSx, nSy )
144        INTEGER myThrS(MAX_NO_THREADS)        INTEGER tileCommModeS ( nSx, nSy )
145        INTEGER myThrN(MAX_NO_THREADS)        INTEGER tileNo( nSx, nSy )
146        INTEGER myThrW(MAX_NO_THREADS)        INTEGER tileNoW( nSx, nSy )
147        INTEGER myThrE(MAX_NO_THREADS)        INTEGER tileNoE( nSx, nSy )
148        INTEGER myThrSW(MAX_NO_THREADS)        INTEGER tileNoN( nSx, nSy )
149        INTEGER myThrNW(MAX_NO_THREADS)        INTEGER tileNoS( nSx, nSy )
150        INTEGER myThrNE(MAX_NO_THREADS)        INTEGER tilePidW( nSx, nSy )
151        INTEGER myThrSE(MAX_NO_THREADS)        INTEGER tilePidE( nSx, nSy )
152          INTEGER tilePidN( nSx, nSy )
153          INTEGER tilePidS( nSx, nSy )
154          INTEGER tileBiW( nSx, nSy )
155          INTEGER tileBiE( nSx, nSy )
156          INTEGER tileBiN( nSx, nSy )
157          INTEGER tileBiS( nSx, nSy )
158          INTEGER tileBjW( nSx, nSy )
159          INTEGER tileBjE( nSx, nSy )
160          INTEGER tileBjN( nSx, nSy )
161          INTEGER tileBjS( nSx, nSy )
162          INTEGER tileTagSendW( nSx, nSy )
163          INTEGER tileTagSendE( nSx, nSy )
164          INTEGER tileTagSendN( nSx, nSy )
165          INTEGER tileTagSendS( nSx, nSy )
166          INTEGER tileTagRecvW( nSx, nSy )
167          INTEGER tileTagRecvE( nSx, nSy )
168          INTEGER tileTagRecvN( nSx, nSy )
169          INTEGER tileTagRecvS( nSx, nSy )
170    
171  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
172  C--   Include MPI standard Fortran header file  C--   Include MPI standard Fortran header file
# Line 240  C                     threads. Line 278  C                     threads.
278        INTEGER mpiTagE        INTEGER mpiTagE
279        INTEGER mpiTagN        INTEGER mpiTagN
280        INTEGER mpiTagS        INTEGER mpiTagS
 #endif /* ALLOW_USE_MPI */  
281    
282    C MPI communicator describing this model realization
283          COMMON /MPI_COMMS/
284         &        MPI_COMM_MODEL
285          INTEGER MPI_COMM_MODEL
286    #endif /* ALLOW_USE_MPI */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22