| 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 |
write(*, |
| 20 |
+'(A,A,A,A,L,A,L,A,L,A,L,A,L,A,L,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 |
+' TD:',double_tape_pointer, |
| 29 |
+' TI:',integer_tape_pointer |
| 30 |
end if |
| 31 |
|
| 32 |
if (our_rev_mode%plain) then |
| 33 |
c write(*,'(A,A,A)') |
| 34 |
c +'JU:',indentation(1:our_indent), " __SRNAME__: entering plain" |
| 35 |
!$PLACEHOLDER_PRAGMA$ id=1 |
| 36 |
end if |
| 37 |
if (our_rev_mode%tape) then |
| 38 |
c write(*,'(A,A,A)') |
| 39 |
c +'JU:',indentation(1:our_indent), " __SRNAME__: entering tape" |
| 40 |
!$PLACEHOLDER_PRAGMA$ id=2 |
| 41 |
end if |
| 42 |
if (our_rev_mode%adjoint) then |
| 43 |
c write(*,'(A,A,A)') |
| 44 |
c +'JU:',indentation(1:our_indent), " __SRNAME__: entering adjoint" |
| 45 |
!$PLACEHOLDER_PRAGMA$ id=3 |
| 46 |
end if |
| 47 |
|
| 48 |
if (splitPrint) then |
| 49 |
write(*, |
| 50 |
+'(A,A,A,A,L,A,L,A,L,A,L,A,L,A,L,A,I8,A,I8)') |
| 51 |
+'JU:',indentation(1:our_indent), 'leave __SRNAME__:', |
| 52 |
+' As:',our_rev_mode%arg_store, |
| 53 |
+' Ar:',our_rev_mode%arg_restore, |
| 54 |
+' Pl:',our_rev_mode%plain, |
| 55 |
+' Ta:',our_rev_mode%tape, |
| 56 |
+' Ad:',our_rev_mode%adjoint, |
| 57 |
+' Sw:',our_rev_mode%switchedToCheckpoint, |
| 58 |
+' TD:',double_tape_pointer, |
| 59 |
+' TI:',integer_tape_pointer |
| 60 |
end if |
| 61 |
|
| 62 |
our_indent=our_indent-1 |
| 63 |
end subroutine template |