/[MITgcm]/MITgcm/tools/OAD_support/ad_template.global_max_r8.F
ViewVC logotype

Contents of /MITgcm/tools/OAD_support/ad_template.global_max_r8.F

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


Revision 1.1 - (show annotations) (download)
Thu Sep 20 23:12:47 2012 UTC (11 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64a, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint64n, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64c, checkpoint64g, checkpoint64f, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64, checkpoint65, checkpoint64j, checkpoint64m, checkpoint64l, HEAD
* Merge OAD_support from MITgcm_contrib/heimbach/OpenAD/OAD_support/
  to tools/OAD_support/
* Adjust genmake2 to reflect path change (attempt with ${OADTOOLS})
* Adjust insertTemplateDir.bash to reflect path change
Seems to work.

1 subroutine template()
2 use OAD_rev
3
4 !$TEMPLATE_PRAGMA_DECLARATIONS
5
6 type(modeType) :: our_orig_mode
7
8 c lovcal vars:
9
10 real*8 maxPhip
11
12 #ifdef OAD_DEBUG_SPLIT2
13
14 character*(80):: indentation='
15 + '
16 our_indent=our_indent+1
17
18 write(standardmessageunit, '(A,A,A)', ADVANCE='NO')
19 +'OAD:',indentation(1:our_indent), 'enter __SRNAME__:'
20 call oad_dump_revmod(); call oad_dump_tapestats()
21 write(standardmessageunit,*)
22 #endif
23
24 if (our_rev_mode%plain .OR. our_rev_mode%tape) then
25 #ifdef OAD_DEBUG_SPLIT2
26 write(standardmessageunit,'(A,A,A)')
27 +'OAD:',indentation(1:our_indent),
28 +' __SRNAME__: entering plain or tape'
29 #endif
30 maxPhip = maxPhi%v
31 c set up for plain execution
32 our_orig_mode=our_rev_mode
33 our_rev_mode%arg_store=.FALSE.
34 our_rev_mode%arg_restore=.FALSE.
35 our_rev_mode%plain=.TRUE.
36 our_rev_mode%tape=.FALSE.
37 our_rev_mode%adjoint=.FALSE.
38 call global_max_r8( maxPhip,myThid )
39 c reset the mode
40 our_rev_mode=our_orig_mode
41 c copy back
42 maxPhi%v = maxPhip
43 end if
44 if (our_rev_mode%adjoint) then
45 #ifdef OAD_DEBUG_SPLIT2
46 write(standardmessageunit,'(A,A,A)')
47 +'OAD:',indentation(1:our_indent),
48 +' __SRNAME__: entering adjoint'
49 #endif
50 maxPhip = maxPhi%d
51 c set up for plain execution
52 our_orig_mode=our_rev_mode
53 our_rev_mode%arg_store=.FALSE.
54 our_rev_mode%arg_restore=.FALSE.
55 our_rev_mode%plain=.TRUE.
56 our_rev_mode%tape=.FALSE.
57 our_rev_mode%adjoint=.FALSE.
58 call global_admax_r8( maxPhip,myThid )
59 c reset the mode
60 our_rev_mode=our_orig_mode
61 c copy back
62 maxPhi%d = maxPhip
63 end if
64
65 #ifdef OAD_DEBUG_SPLIT2
66 write(standardmessageunit,'(A,A,A)', ADVANCE='NO')
67 +'OAD:',indentation(1:our_indent), 'leave __SRNAME__:'
68 call oad_dump_revmod(); call oad_dump_tapestats()
69 write(standardmessageunit,*)
70
71 our_indent=our_indent-1
72 #endif
73
74 end subroutine template

  ViewVC Help
Powered by ViewVC 1.1.22