/[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.7 by cnh, Fri Sep 21 03:54:35 2001 UTC
# Line 1  Line 1 
1  C $Id$  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 64  C Line 87  C
87  C                                         the main.F master loop. This should not happen  C                                         the main.F master loop. This should not happen
88  C                                         if the multi-threading compilation tools works right.  C                                         if the multi-threading compilation tools works right.
89  C                                         But (see for example KAP) this is not always the case!  C                                         But (see for example KAP) this is not always the case!
90    C     printMapIncludesZeros - Flag that controls whether character constant map code ignores
91    C                             exact zero values.
92        COMMON /EESUPP_L/ thError, threadIsRunning, threadIsComplete,        COMMON /EESUPP_L/ thError, threadIsRunning, threadIsComplete,
93       & allMyEdgesAreSharedMemory, usingMPI, usingSyncMessages,       & allMyEdgesAreSharedMemory, usingMPI, usingSyncMessages,
94       & notUsingXPeriodicity, notUsingYPeriodicity       & notUsingXPeriodicity, notUsingYPeriodicity,
95         & printMapIncludesZeros
96        LOGICAL thError(MAX_NO_THREADS)        LOGICAL thError(MAX_NO_THREADS)
97        LOGICAL threadIsRunning(MAX_NO_THREADS)        LOGICAL threadIsRunning(MAX_NO_THREADS)
98        LOGICAL threadIsComplete(MAX_NO_THREADS)        LOGICAL threadIsComplete(MAX_NO_THREADS)
# Line 75  C Line 101  C
101        LOGICAL usingSyncMessages        LOGICAL usingSyncMessages
102        LOGICAL notUsingXPeriodicity        LOGICAL notUsingXPeriodicity
103        LOGICAL notUsingYPeriodicity        LOGICAL notUsingYPeriodicity
104          LOGICAL printMapIncludesZeros
105    
   
106  C--   COMMON /EESUPP_I/ Parallel support integer globals  C--   COMMON /EESUPP_I/ Parallel support integer globals
107  C     pidW   - "Process" ID of neighbor to West  C     pidW   -  Process  ID of neighbor to West
108  C     pidE   -    "       "       "        East  C     pidE   -           ditto             East
109  C     pidN   -    "       "       "        North  C     pidN   -           ditto             North
110  C     pidS   -    "       "       "        South  C     pidS   -           ditto             South
 C     pidNE  -    "       "       "        North-East  
 C     pidNW  -    "       "       "        North-West  
 C     pidSE  -    "       "       "        South-East  
 C     pidSW  -    "       "       "        South-West  
111  C              Note: pid[XY] is not necessairily the UNIX  C              Note: pid[XY] is not necessairily the UNIX
112  C                    process id - it is just an identifying  C                    process id - it is just an identifying
113  C                    number.  C                    number.
114  C     commW       - Communication method at thread edge to the  C     myPid  - My own process id
115  C     commE         west (W), east (E), south (S), north (N).  C     nProcs - Number of processes
116  C     commS  C     westCommunicationMode  - Mode of communication for each tile face
117  C     commN  C     eastCommunicationMode
118  C     myThrS      - Thread number of neighboring thread, used  C     northCommunicationMode
119  C     myThrN        to match senders with receivers of  C     southCommunicationMode
120  C     myThrW        messages.  C     bi0   - Low cartesian tile index for this process
121  C     myThrE  C     bj0     Note - In a tile distribution with holes bi0 and bj0
122  C     myThrSW  C                    are not useful. Neighboring tile indices must
123  C     myThrSE  C                    be derived some other way.
124  C     myThrNW  C     tileNo       - Tile identification number for my tile and
125  C     myThrNE  C     tileNo[WENS]   my N,S,E,W neighbor tiles.
126  C     nTx, nTy    - No. threads in X and Y. This assumes a simple cartesian  C     tilePid[WENS] - Process identification number for
127  C                   gridding of the threads which is not required elsewhere  C                     my N,S,E,W neighbor tiles.
128  C                   but that makes it easier.  C     nTx, nTy    - No. threads in X and Y. This assumes a simple
129    C                   cartesian gridding of the threads which is not
130    C                   required elsewhere but that makes it easier.
131        COMMON /EESUPP_I/        COMMON /EESUPP_I/
132       & pidW, pidE, pidS, pidN, pidSE, pidSW, pidNE, pidNW,       & myPid, nProcs, pidW, pidE, pidN, pidS,
133       & commW, commN, commS, commE,       & tileCommModeW,  tileCommModeE,
134       & myThrS,  myThrN,  myThrW,  myThrE,       & tileCommModeN,  tileCommModeS,
135       & myThrNE, myThrNW, myThrSE, myThrSW       & tileNo, tileNoW, tileNoE, tileNoS, tileNoN,
136        INTEGER commW(MAX_NO_THREADS)       &  tilePidW, tilePidE, tilePidS, tilePidN,
137        INTEGER commE(MAX_NO_THREADS)       &  tileBiW, tileBiE, tileBiS, tileBiN,
138        INTEGER commN(MAX_NO_THREADS)       & tileBjW, tileBjE, tileBjS, tileBjN,
139        INTEGER commS(MAX_NO_THREADS)       & tileTagSendW, tileTagSendE, tileTagSendS, tileTagSendN,
140         & tileTagRecvW, tileTagRecvE, tileTagRecvS, tileTagRecvN
141          INTEGER myPid
142          INTEGER nProcs
143        INTEGER pidW        INTEGER pidW
144        INTEGER pidE        INTEGER pidE
       INTEGER pidS  
145        INTEGER pidN        INTEGER pidN
146        INTEGER pidSE        INTEGER pidS
147        INTEGER pidSW        INTEGER tileCommModeW ( nSx, nSy )
148        INTEGER pidNE        INTEGER tileCommModeE ( nSx, nSy )
149        INTEGER pidNW        INTEGER tileCommModeN ( nSx, nSy )
150        INTEGER myThrS(MAX_NO_THREADS)        INTEGER tileCommModeS ( nSx, nSy )
151        INTEGER myThrN(MAX_NO_THREADS)        INTEGER tileNo( nSx, nSy )
152        INTEGER myThrW(MAX_NO_THREADS)        INTEGER tileNoW( nSx, nSy )
153        INTEGER myThrE(MAX_NO_THREADS)        INTEGER tileNoE( nSx, nSy )
154        INTEGER myThrSW(MAX_NO_THREADS)        INTEGER tileNoN( nSx, nSy )
155        INTEGER myThrNW(MAX_NO_THREADS)        INTEGER tileNoS( nSx, nSy )
156        INTEGER myThrNE(MAX_NO_THREADS)        INTEGER tilePidW( nSx, nSy )
157        INTEGER myThrSE(MAX_NO_THREADS)        INTEGER tilePidE( nSx, nSy )
158          INTEGER tilePidN( nSx, nSy )
159          INTEGER tilePidS( nSx, nSy )
160          INTEGER tileBiW( nSx, nSy )
161          INTEGER tileBiE( nSx, nSy )
162          INTEGER tileBiN( nSx, nSy )
163          INTEGER tileBiS( nSx, nSy )
164          INTEGER tileBjW( nSx, nSy )
165          INTEGER tileBjE( nSx, nSy )
166          INTEGER tileBjN( nSx, nSy )
167          INTEGER tileBjS( nSx, nSy )
168          INTEGER tileTagSendW( nSx, nSy )
169          INTEGER tileTagSendE( nSx, nSy )
170          INTEGER tileTagSendN( nSx, nSy )
171          INTEGER tileTagSendS( nSx, nSy )
172          INTEGER tileTagRecvW( nSx, nSy )
173          INTEGER tileTagRecvE( nSx, nSy )
174          INTEGER tileTagRecvN( nSx, nSy )
175          INTEGER tileTagRecvS( nSx, nSy )
176    
177  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
178  C--   Include MPI standard Fortran header file  C--   Include MPI standard Fortran header file
# Line 240  C                     threads. Line 284  C                     threads.
284        INTEGER mpiTagE        INTEGER mpiTagE
285        INTEGER mpiTagN        INTEGER mpiTagN
286        INTEGER mpiTagS        INTEGER mpiTagS
 #endif /* ALLOW_USE_MPI */  
287    
288    C MPI communicator describing this model realization
289          COMMON /MPI_COMMS/
290         &        MPI_COMM_MODEL
291          INTEGER MPI_COMM_MODEL
292    #endif /* ALLOW_USE_MPI */

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

  ViewVC Help
Powered by ViewVC 1.1.22