/[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.2 - (show annotations) (download)
Sun Feb 4 14:38:41 2001 UTC (23 years, 2 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint38, c37_adj, checkpoint37, checkpoint36, checkpoint35
Branch point for: pre38
Changes since 1.1: +2 -1 lines
File MIME type: text/plain
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

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

  ViewVC Help
Powered by ViewVC 1.1.22