|
||||
File indexing completed on 2023-03-03 06:09:44 UTC
view on githubraw file Latest commit f40bb882 on 2023-02-15 16:52:00 UTCbd47229330 Jean*0001 #ifndef AUTODIFF_OPTIONS_H 0002 #define AUTODIFF_OPTIONS_H 0003 #include "PACKAGES_CONFIG.h" 0004 #include "CPP_OPTIONS.h" 0005 c82e58ec74 Ed H*0006 CBOP cf7f1ba516 Jean*0007 C !ROUTINE: AUTODIFF_OPTIONS.h 0008 C !INTERFACE: 0009 C #include "AUTODIFF_OPTIONS.h" 0010 0011 C !DESCRIPTION: 0012 C *==================================================================* d73774e1e6 Jean*0013 C | CPP options file for AutoDiff (autodiff) package: cf7f1ba516 Jean*0014 C | Control which optional features to compile in this package code. 0015 C *==================================================================* c82e58ec74 Ed H*0016 CEOP 0017 d6c8672c92 Jean*0018 #ifdef ALLOW_AUTODIFF d73774e1e6 Jean*0019 #ifdef ECCO_CPPOPTIONS_H cf7f1ba516 Jean*0020 d73774e1e6 Jean*0021 C-- When multi-package option-file ECCO_CPPOPTIONS.h is used (directly included 0022 C in CPP_OPTIONS.h), this option file is left empty since all options that 0023 C are specific to this package are assumed to be set in ECCO_CPPOPTIONS.h 0024 0025 #else /* ndef ECCO_CPPOPTIONS_H */ 0026 C ================================================================== 0027 C-- Package-specific Options & Macros go here 0028 bd47229330 Jean*0029 C o Include/exclude code in order to automatically differentiate MITgcm code 0030 C using TAF (Transformation of Algorithms in Fortran, http://www.FastOpt.de) 0418563bfa Jean*0031 C or using TAMC (Tangent Linear & Adjoint Model Compiler, needs both defined): d73774e1e6 Jean*0032 #define ALLOW_AUTODIFF_TAMC bd47229330 Jean*0033 #undef AUTODIFF_TAMC_COMPATIBILITY d73774e1e6 Jean*0034 0035 C >>> Checkpointing as handled by TAMC 0036 #define ALLOW_TAMC_CHECKPOINTING 0037 0038 C >>> Extract adjoint state 0039 #define ALLOW_AUTODIFF_MONITOR 8b3c056e18 Jean*0040 C >>> and DYNVARS_DIAG adjoint state 0041 #define ALLOW_AUTODIFF_MONITOR_DIAG d73774e1e6 Jean*0042 0043 C >>> DO 2-level checkpointing instead of 3-level bd47229330 Jean*0044 #undef AUTODIFF_2_LEVEL_CHECKPOINT d73774e1e6 Jean*0045 0046 C extend to 4-level checkpointing bd47229330 Jean*0047 #undef AUTODIFF_4_LEVEL_CHECKPOINT d73774e1e6 Jean*0048 0049 C o use divided adjoint to split adjoint computations 0050 #undef ALLOW_DIVIDED_ADJOINT 0051 3c775cbf98 Mart*0052 C o This flag is incredibly useful as it reduces the number of 0053 C tape-files on the disc. Maybe it should even be the default. 0054 #define ALLOW_AUTODIFF_WHTAPEIO bd47229330 Jean*0055 C and related to above: 0056 #undef ALLOW_INIT_WHTAPEIO 3c775cbf98 Mart*0057 0058 C o use standard MDSFINDUINTS instead of local pkg/autodiff version for 0059 C WHTAPEIO code I/O. 0060 C Note: comment out the #define below (instead of having an #undef) to 0061 C enable to set this Option in CPP command line (from the optfile) 0062 c#define AUTODIFF_USE_MDSFINDUNITS 0063 0064 C o use the deprecated autodiff_store/restore method where multiple fields 0065 C are collected in a single buffer field array before storing to tape. 0066 C This functionality has been replaced by WHTAPEIO method (see above). 0067 C Might still be used for OBCS since WHTAPEIO does not support OBCS fields. 0068 #undef AUTODIFF_USE_STORE_RESTORE 0069 #undef AUTODIFF_USE_STORE_RESTORE_OBCS 0070 4240547d2d Mart*0071 C o allow using viscFacInAd to recompute viscosities in AD 0072 #define AUTODIFF_ALLOW_VISCFACADJ 0073 f40bb882f5 Jean*0074 C o To remove part of MOM_CALC_VISC (better name would be: MOM_DISABLE_*) 0075 #undef AUTODIFF_DISABLE_LEITH 0076 #undef AUTODIFF_DISABLE_REYNOLDS_SCALE 0077 3c775cbf98 Mart*0078 C o for output of AD-variables (ALLOW_AUTODIFF_MONITOR), specific code (e.g., 0079 C in addummy_in_stepping.F) relies on adexch_uv_xy_rs and adexch_xy_rs S/R 0080 C which might not always be generated by TAF (e.g., when controls do not 0081 C include any 2D forcing field). In those cases, defining this cpp-option 0082 C allows to circumvent this missing code issue. 0083 #undef AUTODIFF_EXCLUDE_ADEXCH_RS 0084 d73774e1e6 Jean*0085 C ================================================================== 0086 #endif /* ndef ECCO_CPPOPTIONS_H */ cf7f1ba516 Jean*0087 #endif /* ALLOW_AUTODIFF */ 0088 #endif /* AUTODIFF_OPTIONS_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated from https://github.com/MITgcm/MITgcm by the 2.2.1-MITgcm-0.1 LXR engine. The LXR team |