/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/ad_template.split.f
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/ad_template.split.f

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Thu Jan 11 00:00:20 2007 UTC (19 years, 10 months ago) by utke
Branch: MAIN
Changes since 1.2: +11 -6 lines
logic to separate strictly anonymous from explicit reversal under a given
top level routine

1 utke 1.1 subroutine template()
2     use OpenAD_checkpoints
3     use OpenAD_tape
4     use OpenAD_rev
5    
6     !$TEMPLATE_PRAGMA_DECLARATIONS
7    
8     integer :: cp_loop_variable_1,cp_loop_variable_2,
9     + cp_loop_variable_3,cp_loop_variable_4
10    
11     integer iaddr
12     external iaddr
13    
14     character*(80):: indentation='
15     + '
16     our_indent=our_indent+1
17    
18     if (splitPrint) then
19 utke 1.2 write(*,
20 utke 1.1 +'(A,A,A,A,L,A,L,A,L,A,L,A,L,A,L,A,I6,A,I6,A,I6,A,I6,A,I8,A,I8)')
21     +'JU:',indentation(1:our_indent), 'enter __SRNAME__:',
22     +' As:',our_rev_mode%arg_store,
23     +' Ar:',our_rev_mode%arg_restore,
24     +' Pl:',our_rev_mode%plain,
25     +' Ta:',our_rev_mode%tape,
26     +' Ad:',our_rev_mode%adjoint,
27     +' Sw:',our_rev_mode%switchedToCheckpoint,
28     +' CD:',cp_double_pointer,
29     +' CI:',cp_integer_pointer,
30     +' CB:',cp_boolean_pointer,
31     +' CS:',cp_string_pointer,
32     +' TD:',double_tape_pointer,
33     +' TI:',integer_tape_pointer
34     end if
35    
36     if (our_rev_mode%plain) then
37 utke 1.2 if (splitPrint) then
38     write(*,'(A,A,A)')
39 utke 1.3 +'JU:',indentation(1:our_indent),
40     +' __SRNAME__: entering plain'
41 utke 1.2 end if
42 utke 1.1 !$PLACEHOLDER_PRAGMA$ id=1
43     end if
44 utke 1.3 if (our_rev_mode%tape .and..not.our_rev_mode%strictAnonymous) then
45 utke 1.2 if (splitPrint) then
46     write(*,'(A,A,A)')
47 utke 1.3 +'JU:',indentation(1:our_indent),
48     +' __SRNAME__: entering tape'
49 utke 1.2 end if
50 utke 1.1 !$PLACEHOLDER_PRAGMA$ id=2
51     end if
52 utke 1.2 if (our_rev_mode%adjoint
53     +.and. .not.our_rev_mode%strictAnonymous) then
54     if (splitPrint) then
55     write(*,'(A,A,A)')
56 utke 1.3 +'JU:',indentation(1:our_indent),
57     +' __SRNAME__: entering adjoint'
58 utke 1.2 end if
59 utke 1.1 !$PLACEHOLDER_PRAGMA$ id=3
60     end if
61 utke 1.2 if (our_rev_mode%tape .and. our_rev_mode%strictAnonymous) then
62     if (splitPrint) then
63     write(*,'(A,A,A)')
64 utke 1.3 +'JU:',indentation(1:our_indent),
65     +' __SRNAME__: entering sa tape'
66 utke 1.2 end if
67     !$PLACEHOLDER_PRAGMA$ id=10
68     end if
69     if (our_rev_mode%adjoint
70     +.and. our_rev_mode%strictAnonymous) then
71     if (splitPrint) then
72     write(*,'(A,A,A)')
73 utke 1.3 +'JU:',indentation(1:our_indent),
74     +' __SRNAME__: entering sa adjoint'
75 utke 1.2 end if
76     !$PLACEHOLDER_PRAGMA$ id=11
77     end if
78 utke 1.1
79     if (splitPrint) then
80     write(*,
81     +'(A,A,A,A,L,A,L,A,L,A,L,A,L,A,L,A,I6,A,I6,A,I6,A,I6,A,I8,A,I8)')
82     +'JU:',indentation(1:our_indent), 'leave __SRNAME__:',
83     +' As:',our_rev_mode%arg_store,
84     +' Ar:',our_rev_mode%arg_restore,
85     +' Pl:',our_rev_mode%plain,
86     +' Ta:',our_rev_mode%tape,
87     +' Ad:',our_rev_mode%adjoint,
88     +' Sw:',our_rev_mode%switchedToCheckpoint,
89     +' CD:',cp_double_pointer,
90     +' CI:',cp_integer_pointer,
91     +' CB:',cp_boolean_pointer,
92     +' CS:',cp_string_pointer,
93     +' TD:',double_tape_pointer,
94     +' TI:',integer_tape_pointer
95     end if
96    
97     our_indent=our_indent-1
98     end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22