/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/OAD_support/ad_template.plain.F
ViewVC logotype

Contents of /MITgcm_contrib/heimbach/OpenAD/OAD_support/ad_template.plain.F

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


Revision 1.7 - (show annotations) (download)
Thu Dec 19 16:04:50 2013 UTC (12 years, 8 months ago) by utke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +0 -0 lines
FILE REMOVED
obsolete duplicates

1 subroutine template()
2 use OAD_cp
3 use OAD_tape
4 use OAD_rev
5
6 c we may need these for the checkpointing
7 use SIZE_mod
8 use EEPARAMS_mod
9 use PARAMS_mod
10 use BAR2_mod
11 use BARRIER_mod
12 use CD_CODE_VARS_mod
13 use CG2D_mod
14 use CG3D_mod
15 use DYNVARS_mod
16 use EESUPPORT_mod
17 use EOS_mod
18 use EXCH_mod
19 use FC_NAMEMANGLE_mod
20 use FFIELDS_mod
21 use GAD_mod
22 use GLOBAL_MAX_mod
23 use GLOBAL_SUM_mod
24 use GMREDI_mod
25 use GMREDI_TAVE_mod
26 use GRID_mod
27 use MPI_INFO_mod
28 use SOLVE_FOR_PRESSURE3D_mod
29 use SOLVE_FOR_PRESSURE_mod
30 use SURFACE_mod
31 use tamc_mod
32 use tamc_keys_mod
33 use cost_mod
34 use g_cost_mod
35 use ctrl_mod
36 use ctrl_dummy_mod
37 use ctrl_weights_mod
38 use optim_mod
39 use grdchk_mod
40
41 !$TEMPLATE_PRAGMA_DECLARATIONS
42
43 integer :: cp_loop_variable_1,cp_loop_variable_2,
44 + cp_loop_variable_3,cp_loop_variable_4,cp_loop_variable_5
45
46 type(modeType) :: our_orig_mode
47
48 integer iaddr
49 external iaddr
50
51 #ifdef OAD_DEBUG_JOINT
52 character*(80):: indentation='
53 + '
54
55 our_indent=our_indent+1
56
57 write(standardmessageunit, '(A,A,A)', ADVANCE='NO')
58 +'OAD:',indentation(1:our_indent), 'enter __SRNAME__:'
59 call oad_dump_revmod(); call oad_dump_tapestats()
60 write(standardmessageunit,*)
61 #endif
62
63 if (our_rev_mode%arg_store
64 + .OR.
65 + our_rev_mode%arg_restore) then
66 write(errormessageunit,'(A)')
67 +'OAD: ERROR : arg (re)store here is wrong logic'
68 stop
69 end if
70 if (our_rev_mode%plain) then
71 #ifdef OAD_DEBUG_JOINT
72 write(standardmessageunit,'(A,A,A)')
73 +'OAD:',indentation(1:our_indent),
74 +' __SRNAME__: entering plain'
75 #endif
76 our_orig_mode=our_rev_mode
77 !$PLACEHOLDER_PRAGMA$ id=1
78 our_rev_mode=our_orig_mode
79 end if
80 if (our_rev_mode%tape) then
81 #ifdef OAD_DEBUG_JOINT
82 write(standardmessageunit,'(A,A,A)')
83 +'OAD:',indentation(1:our_indent),
84 +' __SRNAME__: entering tape'
85 #endif
86 our_orig_mode=our_rev_mode
87 !$PLACEHOLDER_PRAGMA$ id=2
88 our_rev_mode=our_orig_mode
89 end if
90 if (our_rev_mode%adjoint) then
91 #ifdef OAD_DEBUG_JOINT
92 write(standardmessageunit,'(A,A,A)')
93 +'OAD:',indentation(1:our_indent),
94 +' __SRNAME__: entering adjoint'
95 #endif
96 our_orig_mode=our_rev_mode
97 !$PLACEHOLDER_PRAGMA$ id=3
98 our_rev_mode=our_orig_mode
99 end if
100
101 #ifdef OAD_DEBUG_JOINT
102 write(standardmessageunit,'(A,A,A)', ADVANCE='NO')
103 +'OAD:',indentation(1:our_indent), 'leave __SRNAME__:'
104 call oad_dump_revmod(); call oad_dump_tapestats()
105 write(standardmessageunit,*)
106
107 our_indent=our_indent-1
108 #endif
109
110 end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22