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

Annotation 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.5 - (hide annotations) (download)
Mon Jan 18 17:03:02 2010 UTC (16 years, 7 months ago) by utke
Branch: MAIN
Changes since 1.4: +0 -1 lines
rm DFILE reference

1 utke 1.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_JAM_mod
19     use EXCH_mod
20     use FC_NAMEMANGLE_mod
21     use FFIELDS_mod
22     use GAD_mod
23     use GLOBAL_MAX_mod
24     use GLOBAL_SUM_mod
25     use GMREDI_mod
26     use GMREDI_TAVE_mod
27     use GRID_mod
28     use MPI_INFO_mod
29     use SOLVE_FOR_PRESSURE3D_mod
30     use SOLVE_FOR_PRESSURE_mod
31     use SURFACE_mod
32     use tamc_mod
33     use tamc_keys_mod
34     use cost_mod
35     use g_cost_mod
36     use ctrl_mod
37     use ctrl_dummy_mod
38     use ctrl_weights_mod
39     use optim_mod
40     use grdchk_mod
41    
42     !$TEMPLATE_PRAGMA_DECLARATIONS
43    
44     integer :: cp_loop_variable_1,cp_loop_variable_2,
45     + cp_loop_variable_3,cp_loop_variable_4,cp_loop_variable_5
46    
47     type(modeType) :: our_orig_mode
48    
49     integer iaddr
50     external iaddr
51    
52 utke 1.2 #ifdef OAD_DEBUG_JOINT
53 utke 1.1 character*(80):: indentation='
54     + '
55    
56     our_indent=our_indent+1
57    
58 utke 1.3 write(standardmessageunit, '(A,A,A)', ADVANCE='NO')
59 utke 1.2 +'OAD:',indentation(1:our_indent), 'enter __SRNAME__:'
60 utke 1.1 call oad_dump_revmod(); call oad_dump_tapestats()
61 utke 1.3 write(standardmessageunit,*)
62 utke 1.2 #endif
63 utke 1.1
64     if (our_rev_mode%arg_store
65     + .OR.
66     + our_rev_mode%arg_restore) then
67 utke 1.3 write(errormessageunit,'(A)')
68     +'OAD: ERROR : arg (re)store here is wrong logic'
69 utke 1.1 stop
70     end if
71     if (our_rev_mode%plain) then
72 utke 1.2 #ifdef OAD_DEBUG_JOINT
73 utke 1.3 write(standardmessageunit,'(A,A,A)')
74 utke 1.2 +'OAD:',indentation(1:our_indent),
75 utke 1.1 +' __SRNAME__: entering plain'
76 utke 1.2 #endif
77 utke 1.1 our_orig_mode=our_rev_mode
78     !$PLACEHOLDER_PRAGMA$ id=1
79     our_rev_mode=our_orig_mode
80     end if
81     if (our_rev_mode%tape) then
82 utke 1.2 #ifdef OAD_DEBUG_JOINT
83 utke 1.3 write(standardmessageunit,'(A,A,A)')
84 utke 1.2 +'OAD:',indentation(1:our_indent),
85 utke 1.1 +' __SRNAME__: entering tape'
86 utke 1.2 #endif
87 utke 1.1 our_orig_mode=our_rev_mode
88     !$PLACEHOLDER_PRAGMA$ id=2
89     our_rev_mode=our_orig_mode
90     end if
91     if (our_rev_mode%adjoint) then
92 utke 1.2 #ifdef OAD_DEBUG_JOINT
93 utke 1.3 write(standardmessageunit,'(A,A,A)')
94 utke 1.2 +'OAD:',indentation(1:our_indent),
95 utke 1.1 +' __SRNAME__: entering adjoint'
96 utke 1.2 #endif
97 utke 1.1 our_orig_mode=our_rev_mode
98     !$PLACEHOLDER_PRAGMA$ id=3
99     our_rev_mode=our_orig_mode
100     end if
101    
102 utke 1.2 #ifdef OAD_DEBUG_JOINT
103 utke 1.3 write(standardmessageunit,'(A,A,A)', ADVANCE='NO')
104 utke 1.2 +'OAD:',indentation(1:our_indent), 'leave __SRNAME__:'
105 utke 1.1 call oad_dump_revmod(); call oad_dump_tapestats()
106 utke 1.3 write(standardmessageunit,*)
107 utke 1.1
108     our_indent=our_indent-1
109 utke 1.2 #endif
110 utke 1.1
111     end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22