/[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.3 - (hide annotations) (download)
Tue Feb 24 20:01:50 2009 UTC (17 years, 6 months ago) by utke
Branch: MAIN
Changes since 1.2: +9 -8 lines
using message units as the rest of the code

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

  ViewVC Help
Powered by ViewVC 1.1.22