/[MITgcm]/MITgcm/verification/exp4/CPP_EEOPTIONS.h
ViewVC logotype

Annotation of /MITgcm/verification/exp4/CPP_EEOPTIONS.h

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


Revision 1.1 - (hide annotations) (download)
Tue Dec 8 19:44:29 1998 UTC (25 years, 3 months ago) by adcroft
Branch: MAIN
File MIME type: text/plain
Implementation of Open Boundaries:
 o new source code: ini_obcs.F set_obcs.F apply_obcs1.F apply_obcs2.F
                    OBCS.h
 o modified code at a few points, key changes are in
    dynamcis.F the_model_main.F and ini_cg2d.F
 o documentation in OBCS.h and doc/OpenBound.*

1 adcroft 1.1 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/inc/CPP_EEOPTIONS.h,v 1.10 1998/10/28 03:11:33 cnh 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 storage of floating point operands
115     C On many systems it improves performance only to use
116     C 8-byte precision for time stepped variables.
117     C Constant in time terms ( geometric factors etc.. )
118     C can use 4-byte precision, reducing memory utilisation and
119     C boosting performance because of a smaller working
120     C set size. However, on vector CRAY systems this degrades
121     C performance.
122     #define REAL4_IS_SLOW
123    
124     #ifdef REAL4_IS_SLOW
125     #define real Real*8
126     #define REAL Real*8
127     #define _RS Real*8
128     #define _RL Real*8
129     #define RS_IS_REAL8
130     #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R8 ( a, b )
131     #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R8 ( a, b )
132     #define _GLOBAL_SUM_R4(a,b,c) CALL GLOBAL_SUM_R8( a, b , c)
133     #define _GLOBAL_MAX_R4(a,b,c) CALL GLOBAL_MAX_R8( a, b , c)
134     #endif
135    
136     #ifndef REAL4_IS_SLOW
137     #define real Real*4
138     #define REAL Real*8
139     #define _RS Real*4
140     #define _RL Real*8
141     #define RS_IS_REAL4
142     #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R4 ( a, b )
143     #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R4 ( a, b )
144     #define _GLOBAL_SUM_R4(a,b,c) CALL GLOBAL_SUM_R4( a, b , c)
145     #define _GLOBAL_MAX_R4(a,b,c) CALL GLOBAL_MAX_R4( a, b , c)
146     #endif
147    
148     #define _EXCH_XY_R8(a,b) CALL EXCH_XY_R8 ( a, b )
149     #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_R8 ( a, b )
150     #define _GLOBAL_SUM_R8(a,b,c) CALL GLOBAL_SUM_R8( a, b , c)
151     #define _GLOBAL_MAX_R8(a,b,c) CALL GLOBAL_MAX_R8( a, b , c)
152    
153     C-- Control use of "double" precision constants.
154     C Use D0 where it means REAL*8 but not where it means REAL*16
155     #define D0 d0
156     #ifdef REAL_D0_IS_16BYTES
157     #define D0
158     #endif
159    
160     C-- Control XY periodicity in processor to grid mappings
161     C Note: Model code does not need to know whether a domain is
162     C periodic because it has overlap regions for every box.
163     C Model assume that these values have been
164     C filled in some way.
165     #undef ALWAYS_PREVENT_X_PERIODICITY
166     #undef ALWAYS_PREVENT_Y_PERIODICITY
167     #define CAN_PREVENT_X_PERIODICITY
168     #define CAN_PREVENT_Y_PERIODICITY
169    
170     C-- Substitue for 1.D variables
171     C Sun compilers do not use 8-byte precision for literals
172     C unless .Dnn is specified. CRAY vector machines use 16-byte
173     C precision when they see .Dnn which runs very slowly!
174     #ifdef REAL_D0_IS_16BYTES
175     #define _d
176     #define _F64( a ) a
177     #endif
178     #ifndef REAL_D0_IS_16BYTES
179     #define _d D
180     #define _F64( a ) DFLOAT( a )
181     #endif
182    
183     #endif /* _CPP_EEOPTIONS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.22