1 |
jmc |
1.43 |
C $Header: /u/gcmpack/MITgcm/eesupp/inc/CPP_EEOPTIONS.h,v 1.42 2017/08/09 15:18:49 mlosch Exp $ |
2 |
adcroft |
1.17 |
C $Name: $ |
3 |
|
|
|
4 |
cnh |
1.18 |
CBOP |
5 |
|
|
C !ROUTINE: CPP_EEOPTIONS.h |
6 |
|
|
C !INTERFACE: |
7 |
|
|
C include "CPP_EEOPTIONS.h" |
8 |
cnh |
1.1 |
C |
9 |
cnh |
1.18 |
C !DESCRIPTION: |
10 |
|
|
C *==========================================================* |
11 |
edhill |
1.22 |
C | CPP\_EEOPTIONS.h | |
12 |
cnh |
1.18 |
C *==========================================================* |
13 |
cnh |
1.1 |
C | C preprocessor "execution environment" supporting | |
14 |
|
|
C | flags. Use this file to set flags controlling the | |
15 |
|
|
C | execution environment in which a model runs - as opposed | |
16 |
|
|
C | to the dynamical problem the model solves. | |
17 |
|
|
C | Note: Many options are implemented with both compile time| |
18 |
|
|
C | and run-time switches. This allows options to be | |
19 |
|
|
C | removed altogether, made optional at run-time or | |
20 |
|
|
C | to be permanently enabled. This convention helps | |
21 |
|
|
C | with the data-dependence analysis performed by the | |
22 |
|
|
C | adjoint model compiler. This data dependency | |
23 |
|
|
C | analysis can be upset by runtime switches that it | |
24 |
|
|
C | is unable to recoginise as being fixed for the | |
25 |
|
|
C | duration of an integration. | |
26 |
|
|
C | A reasonable way to use these flags is to | |
27 |
|
|
C | set all options as selectable at runtime but then | |
28 |
|
|
C | once an experimental configuration has been | |
29 |
|
|
C | identified, rebuild the code with the appropriate | |
30 |
|
|
C | options set at compile time. | |
31 |
cnh |
1.18 |
C *==========================================================* |
32 |
|
|
CEOP |
33 |
cnh |
1.1 |
|
34 |
adcroft |
1.4 |
#ifndef _CPP_EEOPTIONS_H_ |
35 |
|
|
#define _CPP_EEOPTIONS_H_ |
36 |
|
|
|
37 |
cnh |
1.1 |
C In general the following convention applies: |
38 |
|
|
C ALLOW - indicates an feature will be included but it may |
39 |
|
|
C CAN have a run-time flag to allow it to be switched |
40 |
|
|
C on and off. |
41 |
|
|
C If ALLOW or CAN directives are "undef'd" this generally |
42 |
|
|
C means that the feature will not be available i.e. it |
43 |
|
|
C will not be included in the compiled code and so no |
44 |
|
|
C run-time option to use the feature will be available. |
45 |
|
|
C |
46 |
|
|
C ALWAYS - indicates the choice will be fixed at compile time |
47 |
|
|
C so no run-time option will be present |
48 |
|
|
|
49 |
jmc |
1.33 |
C=== Macro related options === |
50 |
|
|
C-- Control storage of floating point operands |
51 |
|
|
C On many systems it improves performance only to use |
52 |
|
|
C 8-byte precision for time stepped variables. |
53 |
|
|
C Constant in time terms ( geometric factors etc.. ) |
54 |
|
|
C can use 4-byte precision, reducing memory utilisation and |
55 |
|
|
C boosting performance because of a smaller working set size. |
56 |
|
|
C However, on vector CRAY systems this degrades performance. |
57 |
|
|
C Enable to switch REAL4_IS_SLOW from genmake2 (with LET_RS_BE_REAL4): |
58 |
|
|
#ifdef LET_RS_BE_REAL4 |
59 |
|
|
#undef REAL4_IS_SLOW |
60 |
|
|
#else /* LET_RS_BE_REAL4 */ |
61 |
|
|
#define REAL4_IS_SLOW |
62 |
|
|
#endif /* LET_RS_BE_REAL4 */ |
63 |
|
|
|
64 |
|
|
C-- Control use of "double" precision constants. |
65 |
|
|
C Use D0 where it means REAL*8 but not where it means REAL*16 |
66 |
|
|
#define D0 d0 |
67 |
|
|
|
68 |
|
|
C-- Enable some old macro conventions for backward compatibility |
69 |
|
|
#undef USE_OLD_MACROS_R4R8toRSRL |
70 |
|
|
|
71 |
|
|
C=== IO related options === |
72 |
jmc |
1.25 |
C-- Flag used to indicate whether Fortran formatted write |
73 |
cnh |
1.1 |
C and read are threadsafe. On SGI the routines can be thread |
74 |
|
|
C safe, on Sun it is not possible - if you are unsure then |
75 |
|
|
C undef this option. |
76 |
jmc |
1.25 |
#undef FMTFTN_IO_THREAD_SAFE |
77 |
|
|
|
78 |
|
|
C-- Flag used to indicate whether Binary write to Local file (i.e., |
79 |
|
|
C a different file for each tile) and read are thread-safe. |
80 |
|
|
#undef LOCBIN_IO_THREAD_SAFE |
81 |
|
|
|
82 |
|
|
C-- Flag to turn off the writing of error message to ioUnit zero |
83 |
|
|
#undef DISABLE_WRITE_TO_UNIT_ZERO |
84 |
cnh |
1.1 |
|
85 |
jmc |
1.33 |
C-- Alternative formulation of BYTESWAP, faster than |
86 |
|
|
C compiler flag -byteswapio on the Altix. |
87 |
|
|
#undef FAST_BYTESWAP |
88 |
jmc |
1.30 |
|
89 |
mlosch |
1.42 |
C-- Flag to turn on old default of opening scratch files with the |
90 |
|
|
C STATUS='SCRATCH' option. This method, while perfectly FORTRAN-standard, |
91 |
|
|
C caused filename conflicts on some multi-node/multi-processor platforms |
92 |
|
|
C in the past and has been replace by something (hopefully) more robust. |
93 |
|
|
#undef USE_FORTRAN_SCRATCH_FILES |
94 |
|
|
|
95 |
jmc |
1.39 |
C-- Flag defined for eeboot_minimal.F, eeset_parms.F and open_copy_data_file.F |
96 |
|
|
C to write STDOUT, STDERR and scratch files from process 0 only. |
97 |
jmc |
1.38 |
C WARNING: to use only when absolutely confident that the setup is working |
98 |
|
|
C since any message (error/warning/print) from any proc <> 0 will be lost. |
99 |
dimitri |
1.36 |
#undef SINGLE_DISK_IO |
100 |
|
|
|
101 |
jmc |
1.33 |
C=== MPI, EXCH and GLOBAL_SUM related options === |
102 |
dimitri |
1.26 |
C-- Flag turns off MPI_SEND ready_to_receive polling in the |
103 |
|
|
C gather_* subroutines to speed up integrations. |
104 |
|
|
#undef DISABLE_MPI_READY_TO_RECEIVE |
105 |
|
|
|
106 |
cnh |
1.1 |
C-- Control MPI based parallel processing |
107 |
adcroft |
1.19 |
CXXX We no longer select the use of MPI via this file (CPP_EEOPTIONS.h) |
108 |
|
|
CXXX To use MPI, use an appropriate genmake2 options file or use |
109 |
|
|
CXXX genmake2 -mpi . |
110 |
|
|
CXXX #undef ALLOW_USE_MPI |
111 |
jmc |
1.25 |
|
112 |
cnh |
1.1 |
C-- Control use of communication that might overlap computation. |
113 |
|
|
C Under MPI selects/deselects "non-blocking" sends and receives. |
114 |
|
|
#define ALLOW_ASYNC_COMMUNICATION |
115 |
|
|
#undef ALLOW_ASYNC_COMMUNICATION |
116 |
|
|
#undef ALWAYS_USE_ASYNC_COMMUNICATION |
117 |
|
|
C-- Control use of communication that is atomic to computation. |
118 |
|
|
C Under MPI selects/deselects "blocking" sends and receives. |
119 |
|
|
#define ALLOW_SYNC_COMMUNICATION |
120 |
|
|
#undef ALWAYS_USE_SYNC_COMMUNICATION |
121 |
adcroft |
1.13 |
|
122 |
cnh |
1.1 |
C-- Control XY periodicity in processor to grid mappings |
123 |
jmc |
1.25 |
C Note: Model code does not need to know whether a domain is |
124 |
cnh |
1.1 |
C periodic because it has overlap regions for every box. |
125 |
cnh |
1.10 |
C Model assume that these values have been |
126 |
cnh |
1.1 |
C filled in some way. |
127 |
|
|
#undef ALWAYS_PREVENT_X_PERIODICITY |
128 |
|
|
#undef ALWAYS_PREVENT_Y_PERIODICITY |
129 |
|
|
#define CAN_PREVENT_X_PERIODICITY |
130 |
|
|
#define CAN_PREVENT_Y_PERIODICITY |
131 |
|
|
|
132 |
jmc |
1.34 |
C-- disconnect tiles (no exchange between tiles, just fill-in edges |
133 |
|
|
C assuming locally periodic subdomain) |
134 |
|
|
#undef DISCONNECTED_TILES |
135 |
|
|
|
136 |
jmc |
1.40 |
C-- Always cumulate tile local-sum in the same order by applying MPI allreduce |
137 |
|
|
C to array of tiles ; can get slower with large number of tiles (big set-up) |
138 |
jmc |
1.41 |
#define GLOBAL_SUM_ORDER_TILES |
139 |
jmc |
1.40 |
|
140 |
jmc |
1.28 |
C-- Alternative way of doing global sum without MPI allreduce call |
141 |
jmc |
1.40 |
C but instead, explicit MPI send & recv calls. Expected to be slower. |
142 |
jmc |
1.28 |
#undef GLOBAL_SUM_SEND_RECV |
143 |
|
|
|
144 |
jahn |
1.29 |
C-- Alternative way of doing global sum on a single CPU |
145 |
jmc |
1.40 |
C to eliminate tiling-dependent roundoff errors. Note: This is slow. |
146 |
jahn |
1.29 |
#undef CG2D_SINGLECPU_SUM |
147 |
|
|
|
148 |
jmc |
1.33 |
C=== Other options (to add/remove pieces of code) === |
149 |
|
|
C-- Flag to turn on checking for errors from all threads and procs |
150 |
|
|
C (calling S/R STOP_IF_ERROR) before stopping. |
151 |
|
|
#define USE_ERROR_STOP |
152 |
|
|
|
153 |
|
|
C-- Control use of communication with other component: |
154 |
|
|
C allow to import and export from/to Coupler interface. |
155 |
|
|
#undef COMPONENT_MODULE |
156 |
heimbach |
1.32 |
|
157 |
jmc |
1.43 |
C-- Activate some pieces of code for coupling to GEOS AGCM |
158 |
|
|
#undef HACK_FOR_GMAO_CPL |
159 |
|
|
|
160 |
adcroft |
1.14 |
#endif /* _CPP_EEOPTIONS_H_ */ |
161 |
cnh |
1.3 |
|
162 |
adcroft |
1.14 |
#include "CPP_EEMACROS.h" |
163 |
edhill |
1.23 |
|