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

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

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

revision 1.1 by adcroft, Wed Apr 5 15:23:20 2000 UTC revision 1.8 by edhill, Sat Mar 27 03:51:50 2004 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C  C $Name$
3  C     /==========================================================\  
4  C     | CPP_EEMACROS.h                                           |  CBOP
5  C     |==========================================================|  C     !ROUTINE: CPP_EEMACROS.h
6  C     | C preprocessor "execution environment" supporting        |  C     !INTERFACE:
7  C     | macros. Use this file to define macros for  simplifying  |  C     include "CPP_EEMACROS.h "
8  C     | execution environment in which a model runs - as opposed |  C     !DESCRIPTION:
9  C     | to the dynamical problem the model solves.               |  C     *==========================================================*
10  C     \==========================================================/  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    
19  #ifndef _CPP_EEMACROS_H_  #ifndef _CPP_EEMACROS_H_
20  #define _CPP_EEMACROS_H_  #define _CPP_EEMACROS_H_
# Line 77  C     it alone execute the BEGIN_MASTER. Line 84  C     it alone execute the BEGIN_MASTER.
84  #define _BEGIN_MASTER(a)  IF ( a .EQ. 1 ) THEN  #define _BEGIN_MASTER(a)  IF ( a .EQ. 1 ) THEN
85  #define _END_MASTER(a)    ENDIF  #define _END_MASTER(a)    ENDIF
86    
 C--   Control use of JAM routines for Artic network  
 C     These invoke optimized versions of "exchange" and "sum" that  
 C     utilize the programmable aspect of Artic cards.  
 #ifdef LETS_MAKE_JAM  
 #define _JAMEXT _jam  
 #else  
 #define _JAMEXT  
 #endif  
   
87  C--   Control storage of floating point operands  C--   Control storage of floating point operands
88  C     On many systems it improves performance only to use  C     On many systems it improves performance only to use
89  C     8-byte precision for time stepped variables.  C     8-byte precision for time stepped variables.
# Line 97  C     performance. Line 95  C     performance.
95  #ifdef REAL4_IS_SLOW  #ifdef REAL4_IS_SLOW
96  #define _RS Real*8  #define _RS Real*8
97  #define RS_IS_REAL8  #define RS_IS_REAL8
98  #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R8 _JAMEXT ( a, b )  #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R8 ( a, b)
 #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R8 _JAMEXT ( a, b )  
 #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R8 _JAMEXT ( a, b)  
99  #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R8 ( a, b )  #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R8 ( a, b )
100    #define _MPI_TYPE_RS MPI_DOUBLE_PRECISION
101  #else  #else
102  #define _RS Real*4  #define _RS Real*4
103  #define RS_IS_REAL4  #define RS_IS_REAL4
 #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R4 ( a, b )  
 #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R4 ( a, b )  
104  #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R4 ( a, b )  #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R4 ( a, b )
105  #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R4 ( a, b )  #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R4 ( a, b )
106    #define _MPI_TYPE_RS MPI_REAL
107  #endif  #endif
108    #define _EXCH_XY_R4(a,b) CALL EXCH_XY_RS ( a, b )
109    #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_RS ( a, b )
110    
111  #define _RL Real*8  #define _RL Real*8
112  #define _EXCH_XY_R8(a,b) CALL EXCH_XY_R8 _JAMEXT ( a, b )  #define _EXCH_XY_R8(a,b) CALL EXCH_XY_RL ( a, b )
113  #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_R8 _JAMEXT ( a, b )  #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_RL ( a, b )
114  #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8 _JAMEXT ( a, b )  #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8 ( a, b )
115  #define _GLOBAL_MAX_R8(a,b) CALL GLOBAL_MAX_R8 ( a, b )  #define _GLOBAL_MAX_R8(a,b) CALL GLOBAL_MAX_R8 ( a, b )
116    #define _MPI_TYPE_RL MPI_DOUBLE_PRECISION
117    
118    #define _EXCH_XY_RS(a,b) CALL EXCH_XY_RS ( a, b )
119    #define _EXCH_XYZ_RS(a,b) CALL EXCH_XYZ_RS ( a, b )
120    #define _EXCH_XY_RL(a,b) CALL EXCH_XY_RL ( a, b )
121    #define _EXCH_XYZ_RL(a,b) CALL EXCH_XYZ_RL ( a, b )
122    
123    C--   Control use of JAM routines for Artic network
124    C     These invoke optimized versions of "exchange" and "sum" that
125    C     utilize the programmable aspect of Artic cards.
126    #ifdef LETS_MAKE_JAM
127    #define _GLOBAL_SUM_R4(a,b) CALL GLOBAL_SUM_R8_JAM ( a, b)
128    #define _EXCH_XY_R4(a,b) CALL EXCH_XY_R8_JAM ( a, b )
129    #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_R8_JAM ( a, b )
130    #define _EXCH_XY_R8(a,b) CALL EXCH_XY_R8_JAM ( a, b )
131    #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_R8_JAM ( a, b )
132    #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8_JAM ( a, b )
133    
134    #define _EXCH_XY_RS(a,b) CALL EXCH_XY_R8_JAM ( a, b )
135    #define _EXCH_XYZ_RS(a,b) CALL EXCH_XYZ_R8_JAM ( a, b )
136    #define _EXCH_XY_RL(a,b) CALL EXCH_XY_R8_JAM ( a, b )
137    #define _EXCH_XYZ_RL(a,b) CALL EXCH_XYZ_R8_JAM ( a, b )
138    #endif
139    
140  C--   Control use of "double" precision constants.  C--   Control use of "double" precision constants.
141  C     Use D0 where it means REAL*8 but not where it means REAL*16  C     Use D0 where it means REAL*8 but not where it means REAL*16
# Line 127  C     Sun compilers do not use 8-byte pr Line 148  C     Sun compilers do not use 8-byte pr
148  C     unless .Dnn is specified. CRAY vector machines use 16-byte  C     unless .Dnn is specified. CRAY vector machines use 16-byte
149  C     precision when they see .Dnn which runs very slowly!  C     precision when they see .Dnn which runs very slowly!
150  #ifdef REAL_D0_IS_16BYTES  #ifdef REAL_D0_IS_16BYTES
151  #define _d  #define _d E
152  #define _F64( a ) a  #define _F64( a ) a
153  #endif  #endif
154  #ifndef REAL_D0_IS_16BYTES  #ifndef REAL_D0_IS_16BYTES

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22