/[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.2 - (hide annotations) (download)
Tue Feb 24 07:00:34 2009 UTC (17 years, 6 months ago) by utke
Branch: MAIN
Changes since 1.1: +16 -6 lines
reducing progress message via preprocessor

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     write(*, '(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     write(*,*)
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.2 write(*,*) 'OAD: ERROR : arg (re)store here is wrong logic'
70 utke 1.1 stop
71     end if
72     if (our_rev_mode%plain) then
73 utke 1.2 #ifdef OAD_DEBUG_JOINT
74 utke 1.1 write(*,'(A,A,A)')
75 utke 1.2 +'OAD:',indentation(1:our_indent),
76 utke 1.1 +' __SRNAME__: entering plain'
77 utke 1.2 #endif
78 utke 1.1 our_orig_mode=our_rev_mode
79     !$PLACEHOLDER_PRAGMA$ id=1
80     our_rev_mode=our_orig_mode
81     end if
82     if (our_rev_mode%tape) then
83 utke 1.2 #ifdef OAD_DEBUG_JOINT
84 utke 1.1 write(*,'(A,A,A)')
85 utke 1.2 +'OAD:',indentation(1:our_indent),
86 utke 1.1 +' __SRNAME__: entering tape'
87 utke 1.2 #endif
88 utke 1.1 our_orig_mode=our_rev_mode
89     !$PLACEHOLDER_PRAGMA$ id=2
90     our_rev_mode=our_orig_mode
91     end if
92     if (our_rev_mode%adjoint) then
93 utke 1.2 #ifdef OAD_DEBUG_JOINT
94 utke 1.1 write(*,'(A,A,A)')
95 utke 1.2 +'OAD:',indentation(1:our_indent),
96 utke 1.1 +' __SRNAME__: entering adjoint'
97 utke 1.2 #endif
98 utke 1.1 our_orig_mode=our_rev_mode
99     !$PLACEHOLDER_PRAGMA$ id=3
100     our_rev_mode=our_orig_mode
101     end if
102    
103 utke 1.2 #ifdef OAD_DEBUG_JOINT
104 utke 1.1 write(*,'(A,A,A)', ADVANCE='NO')
105 utke 1.2 +'OAD:',indentation(1:our_indent), 'leave __SRNAME__:'
106 utke 1.1 call oad_dump_revmod(); call oad_dump_tapestats()
107     write(*,*)
108    
109     our_indent=our_indent-1
110 utke 1.2 #endif
111 utke 1.1
112     end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22