File indexing completed on 2018-03-02 18:45:04 UTC
view on githubraw file Latest commit f3dcb815 on 2013-11-05 17:20:07 UTC
f3dcb81513 Oliv*0001 #include "CPP_EEOPTIONS.h"
0002 subroutine template()
0003 use OAD_rev
0004
0005
0006
0007 type(modeType) :: our_orig_mode
0008
0009
0010
0011 _RL phiTilep(nSx,nSy)
0012 _RL sumPhip
0013
0014 #ifdef OAD_DEBUG_SPLIT2
0015
0016 character*(80):: indentation='
0017 + '
0018 our_indent=our_indent+1
0019
0020 write(standardmessageunit, '(A,A,A)', ADVANCE='NO')
0021 +'OAD:',indentation(1:our_indent), 'enter __SRNAME__:'
0022 call oad_dump_revmod(); call oad_dump_tapestats()
0023 write(standardmessageunit,*)
0024 #endif
0025
0026 if (our_rev_mode%plain .OR. our_rev_mode%tape) then
0027 #ifdef OAD_DEBUG_SPLIT2
0028 write(standardmessageunit,'(A,A,A)')
0029 +'OAD:',indentation(1:our_indent),
0030 +' __SRNAME__: entering plain or tape'
0031 #endif
0032 phiTilep = phiTile%v
0033
0034 our_orig_mode=our_rev_mode
0035 our_rev_mode%arg_store=.FALSE.
0036 our_rev_mode%arg_restore=.FALSE.
0037 our_rev_mode%plain=.TRUE.
0038 our_rev_mode%tape=.FALSE.
0039 our_rev_mode%adjoint=.FALSE.
0040 call global_sum_tile_rl( phiTilep, sumPhip,myThid )
0041
0042 our_rev_mode=our_orig_mode
0043
0044 sumPhi%v = sumPhip
0045 end if
0046 if (our_rev_mode%adjoint) then
0047 #ifdef OAD_DEBUG_SPLIT2
0048 write(standardmessageunit,'(A,A,A)')
0049 +'OAD:',indentation(1:our_indent),
0050 +' __SRNAME__: entering adjoint'
0051 #endif
0052 phiTilep = phiTile%d
0053 sumPhip = sumPhi%d
0054
0055 our_orig_mode=our_rev_mode
0056 our_rev_mode%arg_store=.FALSE.
0057 our_rev_mode%arg_restore=.FALSE.
0058 our_rev_mode%plain=.TRUE.
0059 our_rev_mode%tape=.FALSE.
0060 our_rev_mode%adjoint=.FALSE.
0061 call global_adsum_tile_rl(phiTilep, sumPhip, myThid)
0062
0063 our_rev_mode=our_orig_mode
0064
0065 phiTile%d = phiTilep
0066 sumPhi%d = sumPhip
0067 end if
0068
0069 #ifdef OAD_DEBUG_SPLIT2
0070 write(standardmessageunit,'(A,A,A)', ADVANCE='NO')
0071 +'OAD:',indentation(1:our_indent), 'leave __SRNAME__:'
0072 call oad_dump_revmod(); call oad_dump_tapestats()
0073 write(standardmessageunit,*)
0074
0075 our_indent=our_indent-1
0076 #endif
0077
0078 end subroutine template