/[MITgcm]/MITgcm/verification/exp5/code/CPP_EEOPTIONS.h
ViewVC logotype

Contents of /MITgcm/verification/exp5/code/CPP_EEOPTIONS.h

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


Revision 1.3 - (show annotations) (download)
Tue Mar 14 16:23:43 2000 UTC (22 years, 2 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint25
Changes since 1.2: +12 -1 lines
File MIME type: text/plain
Added "JAM" routines for use with Artic network (Hyades cluster).

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

  ViewVC Help
Powered by ViewVC 1.1.22