| 1 |
heimbach |
1.1 |
subroutine template() |
| 2 |
|
|
use OpenAD_tape |
| 3 |
|
|
use OpenAD_rev |
| 4 |
|
|
|
| 5 |
|
|
!$TEMPLATE_PRAGMA_DECLARATIONS |
| 6 |
|
|
|
| 7 |
|
|
integer :: cp_loop_variable_1,cp_loop_variable_2, |
| 8 |
|
|
+ cp_loop_variable_3,cp_loop_variable_4 |
| 9 |
|
|
|
| 10 |
|
|
integer iaddr |
| 11 |
|
|
external iaddr |
| 12 |
|
|
|
| 13 |
utke |
1.2 |
character*(80):: indentation=' |
| 14 |
|
|
+ ' |
| 15 |
|
|
our_indent=our_indent+1 |
| 16 |
|
|
c write(*,'(A,A,A,A,L,A,L,A,L,A,L,A,L,A,L)') |
| 17 |
|
|
c +'JU:',indentation(1:our_indent), "enter __SRNAME__:", |
| 18 |
|
|
c +' As:',our_rev_mode%arg_store, |
| 19 |
|
|
c +' Ar:',our_rev_mode%arg_restore, |
| 20 |
|
|
c +' Pl:',our_rev_mode%plain, |
| 21 |
|
|
c +' Ta:',our_rev_mode%tape, |
| 22 |
|
|
c +' Ad:',our_rev_mode%adjoint, |
| 23 |
|
|
c +' Sw:',our_rev_mode%switchedToCheckpoint |
| 24 |
heimbach |
1.1 |
c$$$ |
| 25 |
|
|
c$$$ write(*,'(A,A,A,I8,A,I8)') |
| 26 |
|
|
c$$$ + indentation(1:our_indent), "enter __SRNAME__:", |
| 27 |
|
|
c$$$ + " DT:",double_tape_pointer, |
| 28 |
|
|
c$$$ + " IT:",integer_tape_pointer |
| 29 |
|
|
|
| 30 |
|
|
|
| 31 |
|
|
if (our_rev_mode%plain) then |
| 32 |
utke |
1.2 |
c write(*,'(A,A,A)') |
| 33 |
|
|
c +'JU:',indentation(1:our_indent), " __SRNAME__: entering plain" |
| 34 |
heimbach |
1.1 |
!$PLACEHOLDER_PRAGMA$ id=1 |
| 35 |
|
|
end if |
| 36 |
|
|
if (our_rev_mode%tape) then |
| 37 |
utke |
1.2 |
c write(*,'(A,A,A)') |
| 38 |
|
|
c +'JU:',indentation(1:our_indent), " __SRNAME__: entering tape" |
| 39 |
heimbach |
1.1 |
!$PLACEHOLDER_PRAGMA$ id=2 |
| 40 |
|
|
end if |
| 41 |
|
|
if (our_rev_mode%adjoint) then |
| 42 |
utke |
1.2 |
c write(*,'(A,A,A)') |
| 43 |
|
|
c +'JU:',indentation(1:our_indent), " __SRNAME__: entering adjoint" |
| 44 |
heimbach |
1.1 |
!$PLACEHOLDER_PRAGMA$ id=3 |
| 45 |
|
|
end if |
| 46 |
|
|
|
| 47 |
|
|
c$$$ write(*,'(A,A,A,I8,A,I8)') |
| 48 |
|
|
c$$$ + indentation(1:our_indent), "leave __SRNAME__:", |
| 49 |
|
|
c$$$ + " DT:",double_tape_pointer, |
| 50 |
|
|
c$$$ + " IT:",integer_tape_pointer |
| 51 |
|
|
c$$$ |
| 52 |
utke |
1.2 |
c write(*,'(A,A,A,A,L,A,L,A,L,A,L,A,L,A,L)') |
| 53 |
|
|
c +'JU:',indentation(1:our_indent), "leave __SRNAME__:", |
| 54 |
|
|
c +' As:',our_rev_mode%arg_store, |
| 55 |
|
|
c +' Ar:',our_rev_mode%arg_restore, |
| 56 |
|
|
c +' Pl:',our_rev_mode%plain, |
| 57 |
|
|
c +' Ta:',our_rev_mode%tape, |
| 58 |
|
|
c +' Ad:',our_rev_mode%adjoint, |
| 59 |
|
|
c +' Sw:',our_rev_mode%switchedToCheckpoint |
| 60 |
|
|
our_indent=our_indent-1 |
| 61 |
heimbach |
1.1 |
end subroutine template |