/[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.7 - (hide 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 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_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 utke 1.2 #ifdef OAD_DEBUG_JOINT
52 utke 1.1 character*(80):: indentation='
53     + '
54    
55     our_indent=our_indent+1
56    
57 utke 1.3 write(standardmessageunit, '(A,A,A)', ADVANCE='NO')
58 utke 1.2 +'OAD:',indentation(1:our_indent), 'enter __SRNAME__:'
59 utke 1.1 call oad_dump_revmod(); call oad_dump_tapestats()
60 utke 1.3 write(standardmessageunit,*)
61 utke 1.2 #endif
62 utke 1.1
63     if (our_rev_mode%arg_store
64     + .OR.
65     + our_rev_mode%arg_restore) then
66 utke 1.3 write(errormessageunit,'(A)')
67     +'OAD: ERROR : arg (re)store here is wrong logic'
68 utke 1.1 stop
69     end if
70     if (our_rev_mode%plain) then
71 utke 1.2 #ifdef OAD_DEBUG_JOINT
72 utke 1.3 write(standardmessageunit,'(A,A,A)')
73 utke 1.2 +'OAD:',indentation(1:our_indent),
74 utke 1.1 +' __SRNAME__: entering plain'
75 utke 1.2 #endif
76 utke 1.1 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 utke 1.2 #ifdef OAD_DEBUG_JOINT
82 utke 1.3 write(standardmessageunit,'(A,A,A)')
83 utke 1.2 +'OAD:',indentation(1:our_indent),
84 utke 1.1 +' __SRNAME__: entering tape'
85 utke 1.2 #endif
86 utke 1.1 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 utke 1.2 #ifdef OAD_DEBUG_JOINT
92 utke 1.3 write(standardmessageunit,'(A,A,A)')
93 utke 1.2 +'OAD:',indentation(1:our_indent),
94 utke 1.1 +' __SRNAME__: entering adjoint'
95 utke 1.2 #endif
96 utke 1.1 our_orig_mode=our_rev_mode
97     !$PLACEHOLDER_PRAGMA$ id=3
98     our_rev_mode=our_orig_mode
99     end if
100    
101 utke 1.2 #ifdef OAD_DEBUG_JOINT
102 utke 1.3 write(standardmessageunit,'(A,A,A)', ADVANCE='NO')
103 utke 1.2 +'OAD:',indentation(1:our_indent), 'leave __SRNAME__:'
104 utke 1.1 call oad_dump_revmod(); call oad_dump_tapestats()
105 utke 1.3 write(standardmessageunit,*)
106 utke 1.1
107     our_indent=our_indent-1
108 utke 1.2 #endif
109 utke 1.1
110     end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22