1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
|
CBOP |
5 |
|
C !ROUTINE: CPP_EEOPTIONS.h |
6 |
|
C !INTERFACE: |
7 |
|
C include "CPP_EEOPTIONS.h" |
8 |
C |
C |
9 |
C /==========================================================\ |
C !DESCRIPTION: |
10 |
C | CPP_EEOPTIONS.h | |
C *==========================================================* |
11 |
C |==========================================================| |
C | CPP\_EEOPTIONS.h | |
12 |
|
C *==========================================================* |
13 |
C | C preprocessor "execution environment" supporting | |
C | C preprocessor "execution environment" supporting | |
14 |
C | flags. Use this file to set flags controlling the | |
C | flags. Use this file to set flags controlling the | |
15 |
C | execution environment in which a model runs - as opposed | |
C | execution environment in which a model runs - as opposed | |
28 |
C | once an experimental configuration has been | |
C | once an experimental configuration has been | |
29 |
C | identified, rebuild the code with the appropriate | |
C | identified, rebuild the code with the appropriate | |
30 |
C | options set at compile time. | |
C | options set at compile time. | |
31 |
C \==========================================================/ |
C *==========================================================* |
32 |
|
CEOP |
33 |
|
|
34 |
#ifndef _CPP_EEOPTIONS_H_ |
#ifndef _CPP_EEOPTIONS_H_ |
35 |
#define _CPP_EEOPTIONS_H_ |
#define _CPP_EEOPTIONS_H_ |
46 |
C ALWAYS - indicates the choice will be fixed at compile time |
C ALWAYS - indicates the choice will be fixed at compile time |
47 |
C so no run-time option will be present |
C so no run-time option will be present |
48 |
|
|
49 |
C Flag used to indicate whether Fortran formatted write |
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 |
|
C-- Flag used to indicate whether Fortran formatted write |
73 |
C and read are threadsafe. On SGI the routines can be thread |
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 |
C safe, on Sun it is not possible - if you are unsure then |
75 |
C undef this option. |
C undef this option. |
76 |
#undef FMTFTN_IO_THREADSAFE |
#undef FMTFTN_IO_THREAD_SAFE |
77 |
|
|
78 |
C Flag used to indicate which flavour of multi-threading |
C-- Flag used to indicate whether Binary write to Local file (i.e., |
79 |
C compiler directives to use. Only set one of these. |
C a different file for each tile) and read are thread-safe. |
80 |
C USE_SOLARIS_THREADING - Takes directives for SUN Workshop |
#undef LOCBIN_IO_THREAD_SAFE |
81 |
C compiler. |
|
82 |
C USE_KAP_THREADING - Takes directives for Kuck and |
C-- Flag to turn off the writing of error message to ioUnit zero |
83 |
C Associates multi-threading compiler |
#undef DISABLE_WRITE_TO_UNIT_ZERO |
84 |
C ( used on Digital platforms ). |
|
85 |
C USE_IRIX_THREADING - Takes directives for SGI MIPS |
C-- Alternative formulation of BYTESWAP, faster than |
86 |
C Pro Fortran compiler. |
C compiler flag -byteswapio on the Altix. |
87 |
C USE_EXEMPLAR_THREADING - Takes directives for HP SPP series |
#undef FAST_BYTESWAP |
88 |
C compiler. |
|
89 |
C USE_C90_THREADING - Takes directives for CRAY/SGI C90 |
C=== MPI, EXCH and GLOBAL_SUM related options === |
90 |
C system F90 compiler. |
C-- Flag turns off MPI_SEND ready_to_receive polling in the |
91 |
#ifdef TARGET_SUN |
C gather_* subroutines to speed up integrations. |
92 |
#define USE_SOLARIS_THREADING |
#undef DISABLE_MPI_READY_TO_RECEIVE |
|
#endif |
|
|
|
|
|
#ifdef TARGET_DEC |
|
|
#define USE_KAP_THREADING |
|
|
#endif |
|
|
|
|
|
#ifdef TARGET_SGI |
|
|
#define USE_IRIX_THREADING |
|
|
#endif |
|
|
|
|
|
#ifdef TARGET_HP |
|
|
#define USE_EXEMPLAR_THREADING |
|
|
#endif |
|
|
|
|
|
#ifdef TARGET_CRAY_VECTOR |
|
|
#define USE_C90_THREADING |
|
|
#endif |
|
|
|
|
|
C-- Define the mapping for the _BARRIER macro |
|
|
C On some systems low-level hardware support can be accessed through |
|
|
C compiler directives here. |
|
|
#define _BARRIER CALL BARRIER(myThid) |
|
|
|
|
|
C-- Define the mapping for the BEGIN_CRIT() and END_CRIT() macros. |
|
|
C On some systems we simply execute this section only using the |
|
|
C master thread i.e. its not really a critical section. We can |
|
|
C do this because we don't use critical sections in any critical |
|
|
C sections of our code! |
|
|
#define _BEGIN_CRIT(a) _BEGIN_MASTER(a) |
|
|
#define _END_CRIT(a) _END_MASTER(a) |
|
|
|
|
|
C-- Define the mapping for the BEGIN_MASTER_SECTION() and |
|
|
C END_MASTER_SECTION() macros. These are generally implemented by |
|
|
C simply choosing a particular thread to be "the master" and have |
|
|
C it alone execute the BEGIN_MASTER..., END_MASTER.. sections. |
|
|
#define _BEGIN_MASTER(a) IF ( a .EQ. 1 ) THEN |
|
|
#define _END_MASTER(a) ENDIF |
|
93 |
|
|
94 |
C-- Control MPI based parallel processing |
C-- Control MPI based parallel processing |
95 |
#undef ALLOW_USE_MPI |
CXXX We no longer select the use of MPI via this file (CPP_EEOPTIONS.h) |
96 |
#undef ALWAYS_USE_MPI |
CXXX To use MPI, use an appropriate genmake2 options file or use |
97 |
|
CXXX genmake2 -mpi . |
98 |
|
CXXX #undef ALLOW_USE_MPI |
99 |
|
CXXX #undef ALWAYS_USE_MPI |
100 |
|
|
101 |
C-- Control use of communication that might overlap computation. |
C-- Control use of communication that might overlap computation. |
102 |
C Under MPI selects/deselects "non-blocking" sends and receives. |
C Under MPI selects/deselects "non-blocking" sends and receives. |
103 |
#define ALLOW_ASYNC_COMMUNICATION |
#define ALLOW_ASYNC_COMMUNICATION |
108 |
#define ALLOW_SYNC_COMMUNICATION |
#define ALLOW_SYNC_COMMUNICATION |
109 |
#undef ALWAYS_USE_SYNC_COMMUNICATION |
#undef ALWAYS_USE_SYNC_COMMUNICATION |
110 |
|
|
111 |
C-- Control storage of floating point operands |
C-- Control use of JAM routines for Artic network |
112 |
C On many systems it improves performance only to use |
C These invoke optimized versions of "exchange" and "sum" that |
113 |
C 8-byte precision for time stepped variables. |
C utilize the programmable aspect of Artic cards. |
114 |
C Constant in time terms ( geometric factors etc.. ) |
CXXX No longer supported ; started to remove JAM routines. |
115 |
C can use 4-byte precision, reducing memory utilisation and |
CXXX #undef LETS_MAKE_JAM |
116 |
C boosting performance because of a smaller working |
CXXX #undef JAM_WITH_TWO_PROCS_PER_NODE |
|
C set size. However, on vector CRAY systems this degrades |
|
|
C performance. |
|
|
#define REAL4_IS_SLOW |
|
|
|
|
|
#ifdef REAL4_IS_SLOW |
|
|
#define real Real*8 |
|
|
#define REAL Real*8 |
|
|
#define _RS Real*8 |
|
|
#define _RL Real*8 |
|
|
#define _EXCH_XY_R4(a,b) CALL EXCH_XY_R8 ( a, b ) |
|
|
#define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R8 ( a, b ) |
|
|
#define _GLOBAL_SUM_R4(a,b,c) CALL GLOBAL_SUM_R8( a, b , c) |
|
|
#define _GLOBAL_MAX_R4(a,b,c) CALL GLOBAL_MAX_R8( a, b , c) |
|
|
#endif |
|
|
|
|
|
#ifndef REAL4_IS_SLOW |
|
|
#define real Real*4 |
|
|
#define REAL Real*8 |
|
|
#define _RS Real*4 |
|
|
#define _RL Real*8 |
|
|
#define _EXCH_XY_R4(a,b) CALL EXCH_XY_R4 ( a, b ) |
|
|
#define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R4 ( a, b ) |
|
|
#define _GLOBAL_SUM_R4(a,b,c) CALL GLOBAL_SUM_R4( a, b , c) |
|
|
#define _GLOBAL_MAX_R4(a,b,c) CALL GLOBAL_MAX_R4( a, b , c) |
|
|
#endif |
|
|
|
|
|
#define _EXCH_XY_R8(a,b) CALL EXCH_XY_R8 ( a, b ) |
|
|
#define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_R8 ( a, b ) |
|
|
#define _GLOBAL_SUM_R8(a,b,c) CALL GLOBAL_SUM_R8( a, b , c) |
|
|
#define _GLOBAL_MAX_R8(a,b,c) CALL GLOBAL_MAX_R8( a, b , c) |
|
|
|
|
|
C-- Control use of "double" precision constants. |
|
|
C Use D0 where it means REAL*8 but not where it means REAL*16 |
|
|
#define D0 d0 |
|
|
#ifdef REAL_D0_IS_16BYTES |
|
|
#define D0 |
|
|
#endif |
|
117 |
|
|
118 |
C-- Control XY periodicity in processor to grid mappings |
C-- Control XY periodicity in processor to grid mappings |
119 |
C Note: Model code does not need to know whether a domain is |
C Note: Model code does not need to know whether a domain is |
120 |
C periodic because it has overlap regions for every box. |
C periodic because it has overlap regions for every box. |
121 |
C Model's simply assume that these values have been |
C Model assume that these values have been |
122 |
C filled in some way. |
C filled in some way. |
123 |
#undef ALWAYS_PREVENT_X_PERIODICITY |
#undef ALWAYS_PREVENT_X_PERIODICITY |
124 |
#undef ALWAYS_PREVENT_Y_PERIODICITY |
#undef ALWAYS_PREVENT_Y_PERIODICITY |
125 |
#define CAN_PREVENT_X_PERIODICITY |
#define CAN_PREVENT_X_PERIODICITY |
126 |
#define CAN_PREVENT_Y_PERIODICITY |
#define CAN_PREVENT_Y_PERIODICITY |
127 |
|
|
128 |
C-- Substitue for 1.D variables |
C-- disconnect tiles (no exchange between tiles, just fill-in edges |
129 |
C Sun compilers don't use 8-byte precision for literals |
C assuming locally periodic subdomain) |
130 |
C unless .Dnn is specified. CRAY vector machines use 16-byte |
#undef DISCONNECTED_TILES |
131 |
C precision when they see .Dnn which runs very slowly! |
|
132 |
#ifdef REAL_D0_IS_16BYTES |
C-- Alternative way of doing global sum without MPI allreduce call |
133 |
#define _d |
C but instead, explicit MPI send & recv calls. |
134 |
#endif |
#undef GLOBAL_SUM_SEND_RECV |
135 |
#ifndef REAL_D0_IS_16BYTES |
|
136 |
#define _d D |
C-- Alternative way of doing global sum on a single CPU |
137 |
#endif |
C to eliminate tiling-dependent roundoff errors. |
138 |
|
C Note: This is slow. |
139 |
|
#undef CG2D_SINGLECPU_SUM |
140 |
|
|
141 |
|
C=== Other options (to add/remove pieces of code) === |
142 |
|
C-- Flag to turn on checking for errors from all threads and procs |
143 |
|
C (calling S/R STOP_IF_ERROR) before stopping. |
144 |
|
#define USE_ERROR_STOP |
145 |
|
|
146 |
|
C-- Control use of communication with other component: |
147 |
|
C allow to import and export from/to Coupler interface. |
148 |
|
#undef COMPONENT_MODULE |
149 |
|
|
150 |
#endif /* _CPP_EEOPTIONS_H_ */ |
#endif /* _CPP_EEOPTIONS_H_ */ |
151 |
|
|
152 |
|
#include "CPP_EEMACROS.h" |
153 |
|
|