/[MITgcm]/MITgcm/eesupp/inc/CPP_EEMACROS.h
ViewVC logotype

Contents of /MITgcm/eesupp/inc/CPP_EEMACROS.h

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


Revision 1.1 - (show annotations) (download)
Wed Apr 5 15:23:20 2000 UTC (24 years ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint28, checkpoint29, checkpoint27, branch-atmos-merge-freeze, branch-atmos-merge-start, checkpoint26, branch-atmos-merge-shapiro, checkpoint33, checkpoint32, checkpoint31, checkpoint30, checkpoint34, branch-atmos-merge-zonalfilt, branch-atmos-merge-phase5, branch-atmos-merge-phase4, branch-atmos-merge-phase7, branch-atmos-merge-phase6, branch-atmos-merge-phase1, branch-atmos-merge-phase3, branch-atmos-merge-phase2
Branch point for: branch-atmos-merge
File MIME type: text/plain
Split old style CPP_EEOPTIONS.h into two files:

  CPP_EEOPTIONS.h  now contains CPP flags (defines) only
  CPP_EEMACROS.h   contains the macros that are functions of the above flags

The old CPP_EEOPTIONS.h was getting to big and because each experiment
and platform has it's own version it was becoming unmanagable.

Note: Depending on the particular version of cpp, using the old style
CPP_EEOPTIONS.h can still work.

1 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/inc/CPP_EEOPTIONS.h,v 1.13 2000/03/14 16:16:01 adcroft Exp $
2 C
3 C /==========================================================\
4 C | CPP_EEMACROS.h |
5 C |==========================================================|
6 C | C preprocessor "execution environment" supporting |
7 C | macros. Use this file to define macros for simplifying |
8 C | execution environment in which a model runs - as opposed |
9 C | to the dynamical problem the model solves. |
10 C \==========================================================/
11
12 #ifndef _CPP_EEMACROS_H_
13 #define _CPP_EEMACROS_H_
14
15 C In general the following convention applies:
16 C ALLOW - indicates an feature will be included but it may
17 C CAN have a run-time flag to allow it to be switched
18 C on and off.
19 C If ALLOW or CAN directives are "undef'd" this generally
20 C means that the feature will not be available i.e. it
21 C will not be included in the compiled code and so no
22 C run-time option to use the feature will be available.
23 C
24 C ALWAYS - indicates the choice will be fixed at compile time
25 C so no run-time option will be present
26
27 C Flag used to indicate which flavour of multi-threading
28 C compiler directives to use. Only set one of these.
29 C USE_SOLARIS_THREADING - Takes directives for SUN Workshop
30 C compiler.
31 C USE_KAP_THREADING - Takes directives for Kuck and
32 C Associates multi-threading compiler
33 C ( used on Digital platforms ).
34 C USE_IRIX_THREADING - Takes directives for SGI MIPS
35 C Pro Fortran compiler.
36 C USE_EXEMPLAR_THREADING - Takes directives for HP SPP series
37 C compiler.
38 C USE_C90_THREADING - Takes directives for CRAY/SGI C90
39 C system F90 compiler.
40 #ifdef TARGET_SUN
41 #define USE_SOLARIS_THREADING
42 #endif
43
44 #ifdef TARGET_DEC
45 #define USE_KAP_THREADING
46 #endif
47
48 #ifdef TARGET_SGI
49 #define USE_IRIX_THREADING
50 #endif
51
52 #ifdef TARGET_HP
53 #define USE_EXEMPLAR_THREADING
54 #endif
55
56 #ifdef TARGET_CRAY_VECTOR
57 #define USE_C90_THREADING
58 #endif
59
60 C-- Define the mapping for the _BARRIER macro
61 C On some systems low-level hardware support can be accessed through
62 C compiler directives here.
63 #define _BARRIER CALL BARRIER(myThid)
64
65 C-- Define the mapping for the BEGIN_CRIT() and END_CRIT() macros.
66 C On some systems we simply execute this section only using the
67 C master thread i.e. its not really a critical section. We can
68 C do this because we do not use critical sections in any critical
69 C sections of our code!
70 #define _BEGIN_CRIT(a) _BEGIN_MASTER(a)
71 #define _END_CRIT(a) _END_MASTER(a)
72
73 C-- Define the mapping for the BEGIN_MASTER_SECTION() and
74 C END_MASTER_SECTION() macros. These are generally implemented by
75 C simply choosing a particular thread to be "the master" and have
76 C it alone execute the BEGIN_MASTER..., END_MASTER.. sections.
77 #define _BEGIN_MASTER(a) IF ( a .EQ. 1 ) THEN
78 #define _END_MASTER(a) ENDIF
79
80 C-- Control use of JAM routines for Artic network
81 C These invoke optimized versions of "exchange" and "sum" that
82 C utilize the programmable aspect of Artic cards.
83 #ifdef LETS_MAKE_JAM
84 #define _JAMEXT _jam
85 #else
86 #define _JAMEXT
87 #endif
88
89 C-- Control storage of floating point operands
90 C On many systems it improves performance only to use
91 C 8-byte precision for time stepped variables.
92 C Constant in time terms ( geometric factors etc.. )
93 C can use 4-byte precision, reducing memory utilisation and
94 C boosting performance because of a smaller working
95 C set size. However, on vector CRAY systems this degrades
96 C performance.
97 #ifdef REAL4_IS_SLOW
98 #define _RS Real*8
99 #define RS_IS_REAL8
100 #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R8 _JAMEXT ( a, b )
101 #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R8 _JAMEXT ( a, b )
102 #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R8 _JAMEXT ( a, b)
103 #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R8 ( a, b )
104 #else
105 #define _RS Real*4
106 #define RS_IS_REAL4
107 #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R4 ( a, b )
108 #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R4 ( a, b )
109 #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R4 ( a, b )
110 #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R4 ( a, b )
111 #endif
112
113 #define _RL Real*8
114 #define _EXCH_XY_R8(a,b) CALL EXCH_XY_R8 _JAMEXT ( a, b )
115 #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_R8 _JAMEXT ( a, b )
116 #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8 _JAMEXT ( a, b )
117 #define _GLOBAL_MAX_R8(a,b) CALL GLOBAL_MAX_R8 ( a, b )
118
119 C-- Control use of "double" precision constants.
120 C Use D0 where it means REAL*8 but not where it means REAL*16
121 #ifdef REAL_D0_IS_16BYTES
122 #define D0
123 #endif
124
125 C-- Substitue for 1.D variables
126 C Sun compilers do not use 8-byte precision for literals
127 C unless .Dnn is specified. CRAY vector machines use 16-byte
128 C precision when they see .Dnn which runs very slowly!
129 #ifdef REAL_D0_IS_16BYTES
130 #define _d
131 #define _F64( a ) a
132 #endif
133 #ifndef REAL_D0_IS_16BYTES
134 #define _d D
135 #define _F64( a ) DFLOAT( a )
136 #endif
137
138 #endif /* _CPP_EEMACROS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.22