Back to home page

MITgcm

 
 

    


File indexing completed on 2023-03-03 06:09:28 UTC

view on githubraw file Latest commit 49784117 on 2023-03-01 02:05:27 UTC
23a590a7d7 Jean*0001 #ifndef _CPP_EEOPTIONS_H_
                0002 #define _CPP_EEOPTIONS_H_
                0003 
4c563c2ee9 Chri*0004 CBOP
                0005 C     !ROUTINE: CPP_EEOPTIONS.h
                0006 C     !INTERFACE:
                0007 C     include "CPP_EEOPTIONS.h"
924557e60a Chri*0008 C
4c563c2ee9 Chri*0009 C     !DESCRIPTION:
                0010 C     *==========================================================*
2b4c849245 Ed H*0011 C     | CPP\_EEOPTIONS.h                                         |
4c563c2ee9 Chri*0012 C     *==========================================================*
924557e60a Chri*0013 C     | C preprocessor "execution environment" supporting        |
                0014 C     | flags. Use this file to set flags controlling the        |
                0015 C     | execution environment in which a model runs - as opposed |
                0016 C     | to the dynamical problem the model solves.               |
                0017 C     | Note: Many options are implemented with both compile time|
                0018 C     |       and run-time switches. This allows options to be   |
                0019 C     |       removed altogether, made optional at run-time or   |
                0020 C     |       to be permanently enabled. This convention helps   |
                0021 C     |       with the data-dependence analysis performed by the |
                0022 C     |       adjoint model compiler. This data dependency       |
                0023 C     |       analysis can be upset by runtime switches that it  |
                0024 C     |       is unable to recoginise as being fixed for the     |
                0025 C     |       duration of an integration.                        |
                0026 C     |       A reasonable way to use these flags is to          |
                0027 C     |       set all options as selectable at runtime but then  |
                0028 C     |       once an experimental configuration has been        |
                0029 C     |       identified, rebuild the code with the appropriate  |
                0030 C     |       options set at compile time.                       |
4c563c2ee9 Chri*0031 C     *==========================================================*
                0032 CEOP
924557e60a Chri*0033 
                0034 C     In general the following convention applies:
                0035 C     ALLOW  - indicates an feature will be included but it may
                0036 C     CAN      have a run-time flag to allow it to be switched
                0037 C              on and off.
                0038 C              If ALLOW or CAN directives are "undef'd" this generally
                0039 C              means that the feature will not be available i.e. it
                0040 C              will not be included in the compiled code and so no
                0041 C              run-time option to use the feature will be available.
                0042 C
                0043 C     ALWAYS - indicates the choice will be fixed at compile time
                0044 C              so no run-time option will be present
                0045 
d07735cbec Jean*0046 C=== Macro related options ===
                0047 C--   Control storage of floating point operands
                0048 C     On many systems it improves performance only to use
                0049 C     8-byte precision for time stepped variables.
                0050 C     Constant in time terms ( geometric factors etc.. )
                0051 C     can use 4-byte precision, reducing memory utilisation and
                0052 C     boosting performance because of a smaller working set size.
                0053 C     However, on vector CRAY systems this degrades performance.
                0054 C     Enable to switch REAL4_IS_SLOW from genmake2 (with LET_RS_BE_REAL4):
                0055 #ifdef LET_RS_BE_REAL4
                0056 #undef REAL4_IS_SLOW
                0057 #else /* LET_RS_BE_REAL4 */
                0058 #define REAL4_IS_SLOW
                0059 #endif /* LET_RS_BE_REAL4 */
                0060 
                0061 C--   Control use of "double" precision constants.
                0062 C     Use D0 where it means REAL*8 but not where it means REAL*16
                0063 #define D0 d0
                0064 
                0065 C=== IO related options ===
82bc07f474 Jean*0066 C--   Flag used to indicate whether Fortran formatted write
924557e60a Chri*0067 C     and read are threadsafe. On SGI the routines can be thread
                0068 C     safe, on Sun it is not possible - if you are unsure then
                0069 C     undef this option.
82bc07f474 Jean*0070 #undef FMTFTN_IO_THREAD_SAFE
                0071 
                0072 C--   Flag used to indicate whether Binary write to Local file (i.e.,
                0073 C     a different file for each tile) and read are thread-safe.
                0074 #undef LOCBIN_IO_THREAD_SAFE
                0075 
                0076 C--   Flag to turn off the writing of error message to ioUnit zero
                0077 #undef DISABLE_WRITE_TO_UNIT_ZERO
924557e60a Chri*0078 
d07735cbec Jean*0079 C--   Alternative formulation of BYTESWAP, faster than
                0080 C     compiler flag -byteswapio on the Altix.
                0081 #undef FAST_BYTESWAP
ce5cc7e1e9 Jean*0082 
e1ed0cf999 Mart*0083 C--   Flag to turn on old default of opening scratch files with the
                0084 C     STATUS='SCRATCH' option. This method, while perfectly FORTRAN-standard,
                0085 C     caused filename conflicts on some multi-node/multi-processor platforms
                0086 C     in the past and has been replace by something (hopefully) more robust.
                0087 #undef USE_FORTRAN_SCRATCH_FILES
                0088 
eab999d774 Jean*0089 C--   Flag defined for eeboot_minimal.F, eeset_parms.F and open_copy_data_file.F
                0090 C     to write STDOUT, STDERR and scratch files from process 0 only.
ac570ef810 Jean*0091 C WARNING: to use only when absolutely confident that the setup is working
                0092 C     since any message (error/warning/print) from any proc <> 0 will be lost.
eb083ce29c Dimi*0093 #undef SINGLE_DISK_IO
                0094 
d07735cbec Jean*0095 C=== MPI, EXCH and GLOBAL_SUM related options ===
f5cbf7b96d Dimi*0096 C--   Flag turns off MPI_SEND ready_to_receive polling in the
                0097 C     gather_* subroutines to speed up integrations.
                0098 #undef DISABLE_MPI_READY_TO_RECEIVE
                0099 
924557e60a Chri*0100 C--   Control MPI based parallel processing
1bf6cb034b Alis*0101 CXXX We no longer select the use of MPI via this file (CPP_EEOPTIONS.h)
                0102 CXXX To use MPI, use an appropriate genmake2 options file or use
                0103 CXXX genmake2 -mpi .
                0104 CXXX #undef  ALLOW_USE_MPI
82bc07f474 Jean*0105 
924557e60a Chri*0106 C--   Control use of communication that might overlap computation.
                0107 C     Under MPI selects/deselects "non-blocking" sends and receives.
                0108 #undef  ALLOW_ASYNC_COMMUNICATION
                0109 #undef  ALWAYS_USE_ASYNC_COMMUNICATION
                0110 C--   Control use of communication that is atomic to computation.
                0111 C     Under MPI selects/deselects "blocking" sends and receives.
                0112 #define ALLOW_SYNC_COMMUNICATION
                0113 #undef  ALWAYS_USE_SYNC_COMMUNICATION
                0114 
                0115 C--   Control XY periodicity in processor to grid mappings
82bc07f474 Jean*0116 C     Note: Model code does not need to know whether a domain is
924557e60a Chri*0117 C           periodic because it has overlap regions for every box.
46dc4f419b Chri*0118 C           Model assume that these values have been
924557e60a Chri*0119 C           filled in some way.
                0120 #undef  ALWAYS_PREVENT_X_PERIODICITY
                0121 #undef  ALWAYS_PREVENT_Y_PERIODICITY
                0122 #define CAN_PREVENT_X_PERIODICITY
                0123 #define CAN_PREVENT_Y_PERIODICITY
                0124 
408c872b52 Jean*0125 C--   disconnect tiles (no exchange between tiles, just fill-in edges
                0126 C     assuming locally periodic subdomain)
                0127 #undef DISCONNECTED_TILES
                0128 
fb3e97d0ca Jean*0129 C--   Always cumulate tile local-sum in the same order by applying MPI allreduce
                0130 C     to array of tiles ; can get slower with large number of tiles (big set-up)
7b5f312850 Jean*0131 #define GLOBAL_SUM_ORDER_TILES
fb3e97d0ca Jean*0132 
24d1e6a726 Jean*0133 C--   Alternative way of doing global sum without MPI allreduce call
fb3e97d0ca Jean*0134 C     but instead, explicit MPI send & recv calls. Expected to be slower.
24d1e6a726 Jean*0135 #undef GLOBAL_SUM_SEND_RECV
                0136 
7daf14a075 Oliv*0137 C--   Alternative way of doing global sum on a single CPU
fb3e97d0ca Jean*0138 C     to eliminate tiling-dependent roundoff errors. Note: This is slow.
7daf14a075 Oliv*0139 #undef  CG2D_SINGLECPU_SUM
                0140 
d07735cbec Jean*0141 C=== Other options (to add/remove pieces of code) ===
                0142 C--   Flag to turn on checking for errors from all threads and procs
                0143 C     (calling S/R STOP_IF_ERROR) before stopping.
                0144 #define USE_ERROR_STOP
                0145 
                0146 C--   Control use of communication with other component:
                0147 C     allow to import and export from/to Coupler interface.
                0148 #undef COMPONENT_MODULE
c181c2359e Patr*0149 
25903815bf Jean*0150 C--   Activate some pieces of code for coupling to GEOS AGCM
                0151 #undef HACK_FOR_GMAO_CPL
                0152 
4978411747 Jean*0153 C=== And define Macros ===
6b34767493 Alis*0154 #include "CPP_EEMACROS.h"
9a263a84a8 Ed H*0155 
4978411747 Jean*0156 #endif /* _CPP_EEOPTIONS_H_ */