Skip to content

Commit

Permalink
Add interface blocks for TAU_START/TAU_STOP to profile pure procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeekman committed Feb 17, 2025
1 parent baac006 commit 436946f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
11 changes: 10 additions & 1 deletion config_files/tau_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ Fortran:
pure_procedure_begin_insert:
- |-2
call TAU_START("&${full_timer_name}&
! A little fib, worse case the calls to TAU_START and TAU_STOP dropped by optimizer
interface
pure subroutine TAU_START(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_START
pure subroutine TAU_STOP(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_STOP
end interface
call TAU_START("${full_timer_name}&
&")
pure_procedure_end_insert:
Expand Down
31 changes: 29 additions & 2 deletions config_files/tau_pure_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ Fortran:
# Editors might complain about the indentation, but it is correct
program_insert:
- |-2
! A little fib, worse case the calls to TAU_START and TAU_STOP dropped by optimizer
interface
pure subroutine TAU_START(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_START
pure subroutine TAU_STOP(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_STOP
end interface
call TAU_START("${full_timer_name}&
&")
#ifndef TAU_MPI
Expand All @@ -39,6 +48,15 @@ Fortran:
procedure_begin_insert:
- |-2
! A little fib, worse case the calls to TAU_START and TAU_STOP dropped by optimizer
interface
pure subroutine TAU_START(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_START
pure subroutine TAU_STOP(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_STOP
end interface
call TAU_START("${full_timer_name}&
&")
Expand All @@ -49,10 +67,19 @@ Fortran:
pure_procedure_begin_insert:
- |-2
call TAU_START("&${full_timer_name}&
! A little fib, worse case the calls to TAU_START and TAU_STOP dropped by optimizer
interface
pure subroutine TAU_START(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_START
pure subroutine TAU_STOP(timer_name)
character(len=*), intent(in) :: timer_name
end subroutine TAU_STOP
end interface
call TAU_START("${full_timer_name}&
&")
pure_procedure_end_insert:
- |-2
call TAU_STOP("${full_timer_name}&
&")
&")

0 comments on commit 436946f

Please sign in to comment.