/[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)
Mon Nov 26 15:05:20 2007 UTC (18 years, 9 months ago) by utke
Branch: MAIN
Changes since 1.1: +8 -22 lines
refactored taping

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     character*(80):: indentation='
55     + '
56    
57     our_indent=our_indent+1
58    
59 utke 1.2 write(*, '(A,A,A)', ADVANCE='NO')
60     +'JU:',indentation(1:our_indent), 'enter __SRNAME__:'
61     call oad_dump_revmod(); call oad_dump_tapestats()
62     write(*,*)
63 utke 1.1
64     if (our_rev_mode%arg_store
65     + .OR.
66     + our_rev_mode%arg_restore) then
67     write(*,*) 'JU: ERROR : arg (re)store here is wrong logic'
68     stop
69     end if
70     if (our_rev_mode%plain) then
71     write(*,'(A,A,A)')
72     +'JU:',indentation(1:our_indent),
73     +' __SRNAME__: entering plain'
74     our_orig_mode=our_rev_mode
75     !$PLACEHOLDER_PRAGMA$ id=1
76     our_rev_mode=our_orig_mode
77     end if
78     if (our_rev_mode%tape) then
79     write(*,'(A,A,A)')
80     +'JU:',indentation(1:our_indent),
81     +' __SRNAME__: entering tape'
82     our_orig_mode=our_rev_mode
83     !$PLACEHOLDER_PRAGMA$ id=2
84     our_rev_mode=our_orig_mode
85     end if
86     if (our_rev_mode%adjoint) then
87     write(*,'(A,A,A)')
88     +'JU:',indentation(1:our_indent),
89     +' __SRNAME__: entering adjoint'
90     our_orig_mode=our_rev_mode
91     !$PLACEHOLDER_PRAGMA$ id=3
92     our_rev_mode=our_orig_mode
93     end if
94    
95 utke 1.2 write(*,'(A,A,A)', ADVANCE='NO')
96     +'JU:',indentation(1:our_indent), 'leave __SRNAME__:'
97     call oad_dump_revmod(); call oad_dump_tapestats()
98     write(*,*)
99 utke 1.1
100     our_indent=our_indent-1
101    
102     end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22