/[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.2 - (hide annotations) (download)
Thu Jan 4 14:46:52 2007 UTC (19 years, 10 months ago) by utke
Branch: MAIN
Changes since 1.1: +31 -9 lines
case for strict anonymous reversal

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     +'JU:',indentation(1:our_indent), " __SRNAME__: entering plain"
40     end if
41 utke 1.1 !$PLACEHOLDER_PRAGMA$ id=1
42     end if
43 utke 1.2 if (our_rev_mode%tape .and. .not.our_rev_mode%strictAnonymous) then
44     if (splitPrint) then
45     write(*,'(A,A,A)')
46     +'JU:',indentation(1:our_indent), " __SRNAME__: entering tape"
47     end if
48 utke 1.1 !$PLACEHOLDER_PRAGMA$ id=2
49     end if
50 utke 1.2 if (our_rev_mode%adjoint
51     +.and. .not.our_rev_mode%strictAnonymous) then
52     if (splitPrint) then
53     write(*,'(A,A,A)')
54     +'JU:',indentation(1:our_indent), " __SRNAME__: entering adjoint"
55     end if
56 utke 1.1 !$PLACEHOLDER_PRAGMA$ id=3
57     end if
58 utke 1.2 if (our_rev_mode%tape .and. our_rev_mode%strictAnonymous) then
59     if (splitPrint) then
60     write(*,'(A,A,A)')
61     +'JU:',indentation(1:our_indent), " __SRNAME__: entering sa tape"
62     end if
63     !$PLACEHOLDER_PRAGMA$ id=10
64     end if
65     if (our_rev_mode%adjoint
66     +.and. our_rev_mode%strictAnonymous) then
67     if (splitPrint) then
68     write(*,'(A,A,A)')
69     +'JU:',indentation(1:our_indent), " __SRNAME__: entering sa adjoint"
70     end if
71     !$PLACEHOLDER_PRAGMA$ id=11
72     end if
73 utke 1.1
74     if (splitPrint) then
75     write(*,
76     +'(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)')
77     +'JU:',indentation(1:our_indent), 'leave __SRNAME__:',
78     +' As:',our_rev_mode%arg_store,
79     +' Ar:',our_rev_mode%arg_restore,
80     +' Pl:',our_rev_mode%plain,
81     +' Ta:',our_rev_mode%tape,
82     +' Ad:',our_rev_mode%adjoint,
83     +' Sw:',our_rev_mode%switchedToCheckpoint,
84     +' CD:',cp_double_pointer,
85     +' CI:',cp_integer_pointer,
86     +' CB:',cp_boolean_pointer,
87     +' CS:',cp_string_pointer,
88     +' TD:',double_tape_pointer,
89     +' TI:',integer_tape_pointer
90     end if
91    
92     our_indent=our_indent-1
93     end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22