File indexing completed on 2023-11-05 05:10:01 UTC
view on githubraw file Latest commit 65754df4 on 2023-11-04 17:55:24 UTC
b35bd3101a Jean*0001 #include "ADMTLM_OPTIONS.h"
ee5ca1ad15 Patr*0002
0003
0004
0005
0006
0007
0008 SUBROUTINE ADMTLM_DRIVER( myThid )
0009 IMPLICIT NONE
0010
0011
0012
19a87c878d Jean*0013
0014
0015
ee5ca1ad15 Patr*0016
0017
0018
0019
0020
0021 #include "SIZE.h"
0022 #include "EEPARAMS.h"
0023 #include "PARAMS.h"
0024 #include "DYNVARS.h"
0025
8f0b59c61c Patr*0026 #ifdef ALLOW_ADMTLM
7c50f07931 Mart*0027 # ifdef ALLOW_AUTODIFF_TAMC
0028 # include "tamc.h"
0029 # endif
4d72283393 Mart*0030 # include "CTRL.h"
ee5ca1ad15 Patr*0031 #endif
0032
0033
0034
0035 INTEGER myThid
0036
0037
0038 INTEGER myCurrentIter
0039 _RL myCurrentTime
8f0b59c61c Patr*0040
ee5ca1ad15 Patr*0041
0042
19a87c878d Jean*0043 #ifdef ALLOW_DEBUG
ee5ca1ad15 Patr*0044 IF (debugMode) CALL DEBUG_ENTER('ADMTLM_DRIVER',myThid)
0045 #endif
0046
8f0b59c61c Patr*0047 #if ( defined (ALLOW_ADMTLM) )
ee5ca1ad15 Patr*0048
0049 myCurrentTime = startTime
0050 myCurrentIter = nIter0
0051 yadprefix = 'g_'
0052
faf44775ba Patr*0053 CALL CTRL_INIT( mythid )
ee5ca1ad15 Patr*0054
f8659cb5d2 Patr*0055 CALL TIMER_START('ADMTLM_DRIVER [TANGENT RUN]',mythid)
ee5ca1ad15 Patr*0056 CALL G_THE_MAIN_LOOP ( myCurrentTime, myCurrentIter, myThid )
f8659cb5d2 Patr*0057 CALL TIMER_STOP ('ADMTLM_DRIVER [TANGENT RUN]',mythid)
ee5ca1ad15 Patr*0058
0059 myCurrentTime = startTime
0060 myCurrentIter = nIter0
0061 yadprefix = 'ad'
0062
8f0b59c61c Patr*0063 CALL CTRL_INIT( mythid )
ee5ca1ad15 Patr*0064
8a10dfc8f1 Patr*0065 if ( doAdmtlmBypassAD ) then
f8659cb5d2 Patr*0066
ea498bf65a Patr*0067 #ifdef ALLOW_BYPASSAD
f8659cb5d2 Patr*0068 CALL TIMER_START('ADMTLM_DRIVER [BYPASSAD]',mythid)
0069 CALL ADMTLM_BYPASSAD( mythid )
0070 CALL TIMER_STOP ('ADMTLM_DRIVER [BYPASSAD]',mythid)
ea498bf65a Patr*0071 #endif
f8659cb5d2 Patr*0072
0073 else
0074
0075 CALL ADMTLM_METRIC ( mythid )
0076 CALL ADMTLM_MAP ( mythid )
0077
0078 CALL TIMER_START('ADMTLM_DRIVER [ADJOINT RUN]',mythid)
0079 CALL ADTHE_MAIN_LOOP ( myCurrentTime, myCurrentIter, mythid )
0080 CALL TIMER_STOP ('ADMTLM_DRIVER [ADJOINT RUN]',mythid)
0081
0082 endif
ee5ca1ad15 Patr*0083
0084 #endif
0085
19a87c878d Jean*0086 #ifdef ALLOW_DEBUG
ee5ca1ad15 Patr*0087 IF (debugMode) CALL DEBUG_LEAVE('ADMTLM_DRIVER',myThid)
0088 #endif
0089
0090 RETURN
0091 END