/[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.6 by dimitri, Wed Nov 12 00:02:44 2003 UTC revision 1.15 by edhill, Thu Aug 10 17:46:55 2006 UTC
# Line 46  C     USE_C90_THREADING      - Takes dir Line 46  C     USE_C90_THREADING      - Takes dir
46  C                              system F90 compiler.  C                              system F90 compiler.
47  #ifdef TARGET_SUN  #ifdef TARGET_SUN
48  #define USE_SOLARIS_THREADING  #define USE_SOLARIS_THREADING
49    #define USING_THREADS
50  #endif  #endif
51    
52  #ifdef TARGET_DEC  #ifdef TARGET_DEC
53  #define USE_KAP_THREADING  #define USE_KAP_THREADING
54    #define USING_THREADS
55  #endif  #endif
56    
57  #ifdef TARGET_SGI  #ifdef TARGET_SGI
58  #define USE_IRIX_THREADING  #define USE_IRIX_THREADING
59    #define USING_THREADS
60  #endif  #endif
61    
62  #ifdef TARGET_HP  #ifdef TARGET_HP
63  #define USE_EXEMPLAR_THREADING  #define USE_EXEMPLAR_THREADING
64    #define USING_THREADS
65  #endif  #endif
66    
67  #ifdef TARGET_CRAY_VECTOR  #ifdef TARGET_CRAY_VECTOR
68  #define USE_C90_THREADING  #define USE_C90_THREADING
69    #define USING_THREADS
70    #endif
71    
72    #ifdef USE_OMP_THREADING
73    #define USING_THREADS
74  #endif  #endif
75    
76  C--   Define the mapping for the _BARRIER macro  C--   Define the mapping for the _BARRIER macro
# Line 81  C--   Define the mapping for the BEGIN_M Line 90  C--   Define the mapping for the BEGIN_M
90  C     END_MASTER_SECTION() macros. These are generally implemented by  C     END_MASTER_SECTION() macros. These are generally implemented by
91  C     simply choosing a particular thread to be "the master" and have  C     simply choosing a particular thread to be "the master" and have
92  C     it alone execute the BEGIN_MASTER..., END_MASTER.. sections.  C     it alone execute the BEGIN_MASTER..., END_MASTER.. sections.
93  #define _BEGIN_MASTER(a)  IF ( a .EQ. 1 ) THEN  
94  #define _END_MASTER(a)    ENDIF  #define _BEGIN_MASTER(a) IF ( a .EQ. 1 ) THEN
95    #define _END_MASTER(a)   ENDIF
96    CcnhDebugStarts
97    C      Alternate form to the above macros that increments (decrements) a counter each
98    C      time a MASTER section is entered (exited). This counter can then be checked in barrier
99    C      to try and detect calls to BARRIER within single threaded sections.
100    C      Using these macros requires two changes to Makefile - these changes are written
101    C      below.
102    C      1 - add a filter to the CPP command to kill off commented _MASTER lines
103    C      2 - add a filter to the CPP output the converts the string N EWLINE to an actual newline.
104    C      The N EWLINE needs to be changes to have no space when this macro and Makefile changes
105    C      are used. Its in here with a space to stop it getting parsed by the CPP stage in these
106    C      comments.
107    C      #define _BEGIN_MASTER(a)  IF ( a .EQ. 1 ) THEN  N EWLINE      CALL BARRIER_MS(a)
108    C      #define _END_MASTER(a)    CALL BARRIER_MU(a) N EWLINE        ENDIF
109    C      'CPP = cat $< | $(TOOLSDIR)/set64bitConst.sh |  grep -v '^[cC].*_MASTER' | cpp  -traditional -P'
110    C      .F.f:
111    C               $(CPP) $(DEFINES) $(INCLUDES) |  sed 's/N EWLINE/\n/' > $@
112    CcnhDebugEnds
113    
114  C--   Control storage of floating point operands  C--   Control storage of floating point operands
115  C     On many systems it improves performance only to use  C     On many systems it improves performance only to use
# Line 105  C     performance. Line 132  C     performance.
132  #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R4 ( a, b )  #define _GLOBAL_MAX_R4(a,b) CALL GLOBAL_MAX_R4 ( a, b )
133  #define _MPI_TYPE_RS MPI_REAL  #define _MPI_TYPE_RS MPI_REAL
134  #endif  #endif
135  #define _EXCH_XY_R4(a,b) CALL EXCH_XY_RS ( a, b )  #define _EXCH_XY_R4(a,b) CALL EXCH_XY_RL ( a, b )
136  #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_RS ( a, b )  #define _EXCH_XYZ_R4(a,b) CALL EXCH_XYZ_RL ( a, b )
137    
138  #define _RL Real*8  #define _RL Real*8
139    #define RL_IS_REAL8
140  #define _EXCH_XY_R8(a,b) CALL EXCH_XY_RL ( a, b )  #define _EXCH_XY_R8(a,b) CALL EXCH_XY_RL ( a, b )
141  #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_RL ( a, b )  #define _EXCH_XYZ_R8(a,b) CALL EXCH_XYZ_RL ( a, b )
142  #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8 ( a, b )  #define _GLOBAL_SUM_R8(a,b) CALL GLOBAL_SUM_R8 ( a, b )
143  #define _GLOBAL_MAX_R8(a,b) CALL GLOBAL_MAX_R8 ( a, b )  #define _GLOBAL_MAX_R8(a,b) CALL GLOBAL_MAX_R8 ( a, b )
144  #define _MPI_TYPE_RL MPI_DOUBLE_PRECISION  #define _MPI_TYPE_RL MPI_DOUBLE_PRECISION
145    
146  #define _EXCH_XY_RS(a,b) CALL EXCH_XY_RS ( a, b )  #define _EXCH_XY_RS(a,b) CALL EXCH_XY_RL ( a, b )
147  #define _EXCH_XYZ_RS(a,b) CALL EXCH_XYZ_RS ( a, b )  #define _EXCH_XYZ_RS(a,b) CALL EXCH_XYZ_RL ( a, b )
148  #define _EXCH_XY_RL(a,b) CALL EXCH_XY_RL ( a, b )  #define _EXCH_XY_RL(a,b) CALL EXCH_XY_RL ( a, b )
149  #define _EXCH_XYZ_RL(a,b) CALL EXCH_XYZ_RL ( a, b )  #define _EXCH_XYZ_RL(a,b) CALL EXCH_XYZ_RL ( a, b )
150    
151    #define _MPI_TYPE_R4 MPI_REAL
152    #if (defined (TARGET_SGI) || defined (TARGET_AIX) || defined (TARGET_LAM))
153    #define _MPI_TYPE_R8 MPI_DOUBLE_PRECISION
154    #else
155    #define _MPI_TYPE_R8 MPI_REAL8
156    #endif
157    #define _R4 Real*4
158    #define _R8 Real*8
159    
160  C--   Control use of JAM routines for Artic network  C--   Control use of JAM routines for Artic network
161  C     These invoke optimized versions of "exchange" and "sum" that  C     These invoke optimized versions of "exchange" and "sum" that
162  C     utilize the programmable aspect of Artic cards.  C     utilize the programmable aspect of Artic cards.
# Line 148  C     Sun compilers do not use 8-byte pr Line 185  C     Sun compilers do not use 8-byte pr
185  C     unless .Dnn is specified. CRAY vector machines use 16-byte  C     unless .Dnn is specified. CRAY vector machines use 16-byte
186  C     precision when they see .Dnn which runs very slowly!  C     precision when they see .Dnn which runs very slowly!
187  #ifdef REAL_D0_IS_16BYTES  #ifdef REAL_D0_IS_16BYTES
188  #define _d  #define _d E
189  #define _F64( a ) a  #define _F64( a ) a
190  #endif  #endif
191  #ifndef REAL_D0_IS_16BYTES  #ifndef REAL_D0_IS_16BYTES

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22