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

Annotation of /MITgcm/tools/OAD_support/ad_template.global_sum_tile_rl.F

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


Revision 1.1 - (hide annotations) (download)
Tue Nov 5 17:20:07 2013 UTC (10 years, 5 months ago) by jahn
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, 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, checkpoint65, HEAD
add template for global_sum_tile_rl now used in dic_cost.F

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

  ViewVC Help
Powered by ViewVC 1.1.22