/[MITgcm]/MITgcm/verification/hs94.128x64x5/code/CPP_EEOPTIONS.h
ViewVC logotype

Annotation of /MITgcm/verification/hs94.128x64x5/code/CPP_EEOPTIONS.h

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


Revision 1.3 - (hide annotations) (download)
Sun Feb 4 14:38:52 2001 UTC (23 years, 5 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint35, c37_adj, checkpoint37, checkpoint36, checkpoint39, checkpoint38
Branch point for: pre38
Changes since 1.2: +2 -1 lines
File MIME type: text/plain
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 cnh 1.3 C $Header: /u/gcmpack/models/MITgcmUV/verification/hs94.128x64x5/code/CPP_EEOPTIONS.h,v 1.2 2001/02/02 21:36:33 adcroft Exp $
2     C $Name: $
3 adcroft 1.2 C
4     C /==========================================================\
5     C | CPP_EEOPTIONS.h |
6     C |==========================================================|
7     C | C preprocessor "execution environment" supporting |
8     C | flags. Use this file to set flags controlling the |
9     C | execution environment in which a model runs - as opposed |
10     C | to the dynamical problem the model solves. |
11     C | Note: Many options are implemented with both compile time|
12     C | and run-time switches. This allows options to be |
13     C | removed altogether, made optional at run-time or |
14     C | to be permanently enabled. This convention helps |
15     C | with the data-dependence analysis performed by the |
16     C | adjoint model compiler. This data dependency |
17     C | analysis can be upset by runtime switches that it |
18     C | is unable to recoginise as being fixed for the |
19     C | duration of an integration. |
20     C | A reasonable way to use these flags is to |
21     C | set all options as selectable at runtime but then |
22     C | once an experimental configuration has been |
23     C | identified, rebuild the code with the appropriate |
24     C | options set at compile time. |
25     C \==========================================================/
26    
27     #ifndef _CPP_EEOPTIONS_H_
28     #define _CPP_EEOPTIONS_H_
29    
30     C In general the following convention applies:
31     C ALLOW - indicates an feature will be included but it may
32     C CAN have a run-time flag to allow it to be switched
33     C on and off.
34     C If ALLOW or CAN directives are "undef'd" this generally
35     C means that the feature will not be available i.e. it
36     C will not be included in the compiled code and so no
37     C run-time option to use the feature will be available.
38     C
39     C ALWAYS - indicates the choice will be fixed at compile time
40     C so no run-time option will be present
41    
42     C Flag used to indicate whether Fortran formatted write
43     C and read are threadsafe. On SGI the routines can be thread
44     C safe, on Sun it is not possible - if you are unsure then
45     C undef this option.
46     #undef FMTFTN_IO_THREADSAFE
47    
48     C Flag used to indicate which flavour of multi-threading
49     C compiler directives to use. Only set one of these.
50     C USE_SOLARIS_THREADING - Takes directives for SUN Workshop
51     C compiler.
52     C USE_KAP_THREADING - Takes directives for Kuck and
53     C Associates multi-threading compiler
54     C ( used on Digital platforms ).
55     C USE_IRIX_THREADING - Takes directives for SGI MIPS
56     C Pro Fortran compiler.
57     C USE_EXEMPLAR_THREADING - Takes directives for HP SPP series
58     C compiler.
59     C USE_C90_THREADING - Takes directives for CRAY/SGI C90
60     C system F90 compiler.
61     #ifdef TARGET_SUN
62     #define USE_SOLARIS_THREADING
63     #endif
64    
65     #ifdef TARGET_DEC
66     #define USE_KAP_THREADING
67     #endif
68    
69     #ifdef TARGET_SGI
70     #define USE_IRIX_THREADING
71     #endif
72    
73     #ifdef TARGET_HP
74     #define USE_EXEMPLAR_THREADING
75     #endif
76    
77     #ifdef TARGET_CRAY_VECTOR
78     #define USE_C90_THREADING
79     #endif
80    
81     C-- Define the mapping for the _BARRIER macro
82     C On some systems low-level hardware support can be accessed through
83     C compiler directives here.
84     #define _BARRIER CALL BARRIER(myThid)
85    
86     C-- Define the mapping for the BEGIN_CRIT() and END_CRIT() macros.
87     C On some systems we simply execute this section only using the
88     C master thread i.e. its not really a critical section. We can
89     C do this because we do not use critical sections in any critical
90     C sections of our code!
91     #define _BEGIN_CRIT(a) _BEGIN_MASTER(a)
92     #define _END_CRIT(a) _END_MASTER(a)
93    
94     C-- Define the mapping for the BEGIN_MASTER_SECTION() and
95     C END_MASTER_SECTION() macros. These are generally implemented by
96     C simply choosing a particular thread to be "the master" and have
97     C it alone execute the BEGIN_MASTER..., END_MASTER.. sections.
98     #define _BEGIN_MASTER(a) IF ( a .EQ. 1 ) THEN
99     #define _END_MASTER(a) ENDIF
100    
101     C-- Control MPI based parallel processing
102     #undef ALLOW_USE_MPI
103     #undef ALWAYS_USE_MPI
104    
105     C-- Control use of communication that might overlap computation.
106     C Under MPI selects/deselects "non-blocking" sends and receives.
107     #define ALLOW_ASYNC_COMMUNICATION
108     #undef ALLOW_ASYNC_COMMUNICATION
109     #undef ALWAYS_USE_ASYNC_COMMUNICATION
110     C-- Control use of communication that is atomic to computation.
111     C Under MPI selects/deselects "blocking" sends and receives.
112     #define ALLOW_SYNC_COMMUNICATION
113     #undef ALWAYS_USE_SYNC_COMMUNICATION
114    
115     #undef LETS_MAKE_JAM
116     #undef JAM_WITH_TWO_PROCS_PER_NODE
117     #ifdef LETS_MAKE_JAM
118     #define _JAMEXT _jam
119     #else
120     #define _JAMEXT
121     #endif
122    
123     C-- Control storage of floating point operands
124     C On many systems it improves performance only to use
125     C 8-byte precision for time stepped variables.
126     C Constant in time terms ( geometric factors etc.. )
127     C can use 4-byte precision, reducing memory utilisation and
128     C boosting performance because of a smaller working
129     C set size. However, on vector CRAY systems this degrades
130     C performance.
131     #define REAL4_IS_SLOW
132    
133     #ifdef REAL4_IS_SLOW
134     #define _RS Real*8
135     #define _RL Real*8
136     #define RS_IS_REAL8
137     #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R8 _JAMEXT ( a, b )
138     #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R8 _JAMEXT ( a, b )
139     #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R8 _JAMEXT ( a, b )
140     #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R8 ( a, b )
141     #endif
142    
143     #ifndef REAL4_IS_SLOW
144     #define _RS Real*4
145     #define _RL Real*8
146     #define RS_IS_REAL4
147     #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R4 ( a, b )
148     #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R4 ( a, b )
149     #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R4( a, b )
150     #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R4( a, b )
151     #endif
152    
153     #define _EXCH_XY_R8(a,b) CALL EXCH_XY_R8 _JAMEXT ( a, b )
154     #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_R8 _JAMEXT ( a, b )
155     #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8 _JAMEXT ( a, b )
156     #define _GLOBAL_MAX_R8(a,b) CALL GLOBAL_MAX_R8 ( a, b )
157    
158     C-- Control use of "double" precision constants.
159     C Use D0 where it means REAL*8 but not where it means REAL*16
160     #define D0 d0
161     #ifdef REAL_D0_IS_16BYTES
162     #define D0
163     #endif
164    
165     C-- Control XY periodicity in processor to grid mappings
166     C Note: Model code does not need to know whether a domain is
167     C periodic because it has overlap regions for every box.
168     C Model assume that these values have been
169     C filled in some way.
170     #undef ALWAYS_PREVENT_X_PERIODICITY
171     #undef ALWAYS_PREVENT_Y_PERIODICITY
172     #define CAN_PREVENT_X_PERIODICITY
173     #define CAN_PREVENT_Y_PERIODICITY
174    
175     C-- Substitue for 1.D variables
176     C Sun compilers do not use 8-byte precision for literals
177     C unless .Dnn is specified. CRAY vector machines use 16-byte
178     C precision when they see .Dnn which runs very slowly!
179     #ifdef REAL_D0_IS_16BYTES
180     #define _d
181     #define _F64( a ) a
182     #endif
183     #ifndef REAL_D0_IS_16BYTES
184     #define _d D
185     #define _F64( a ) DFLOAT( a )
186     #endif
187    
188     #endif /* _CPP_EEOPTIONS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.22