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

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

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


Revision 1.5 - (hide annotations) (download)
Fri Sep 21 03:54:35 2001 UTC (22 years, 7 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47e_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, release1_p13_pre, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, checkpoint51o_pre, ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, release1_p13, checkpoint51l_post, checkpoint48i_post, checkpoint46l_pre, chkpt44d_post, checkpoint51, checkpoint50, checkpoint52, release1_p8, release1_p9, checkpoint50d_post, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint50b_pre, checkpoint44e_pre, checkpoint51f_post, release1_b1, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, checkpoint48b_post, checkpoint43, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint51n_post, release1_chkpt44d_post, checkpoint51s_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, release1_p11, checkpoint51n_pre, checkpoint47d_post, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, checkpoint48d_post, release1-branch_tutorials, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, checkpoint51l_pre, chkpt44a_post, checkpoint44h_pre, checkpoint48h_post, checkpoint51q_post, ecco_c50_e29, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, ecco_c50_e28, chkpt44c_pre, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint47j_post, ecco_c50_e33a, branch-exfmods-tag, checkpoint44g_post, branchpoint-genmake2, checkpoint46e_pre, checkpoint51r_post, checkpoint48c_post, checkpoint45b_post, checkpoint46b_pre, checkpoint51i_post, release1-branch-end, release1_final_v1, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint44b_post, ecco_c51_e34, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, release1_p12_pre, ecco_c44_e22, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, ecco_c44_e25, checkpoint51i_pre, checkpoint47f_post, checkpoint50e_post, chkpt44a_pre, checkpoint46i_post, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint50d_pre, checkpoint46e_post, release1_beta1, checkpoint51e_post, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51o_post, checkpoint51f_pre, chkpt44c_post, checkpoint48g_post, checkpoint47h_post, checkpoint44f_pre, checkpoint51g_post, ecco_c52_e35, checkpoint46d_post, checkpoint50b_post, release1-branch_branchpoint, checkpoint51m_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: c24_e25_ice, branch-exfmods-curt, release1_final, release1-branch, branch-genmake2, release1, branch-nonh, tg2-branch, ecco-branch, release1_50yr, icebear, checkpoint51n_branch, release1_coupled
Changes since 1.4: +15 -9 lines
File MIME type: text/plain
Starting to bring comments up to date and format comments
for document extraction of "prototypes".

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

  ViewVC Help
Powered by ViewVC 1.1.22