Skip to content

Add Fortran scope/namespace to timer name to match PDT parsers #35

@zbeekman

Description

@zbeekman

The PDT parsers will emit timer names that reflect the scope of the procedure declaration. For example you might have nested internal procedures within a module or a main program:

program main
  implicit none
  call greet("sam")
contains
  subroutine greet(person)
    character(len=*), intent(in) :: person
    character(len=:), allocatable :: message
    message = get_greeting_for(person)
    print*, trim(message)
  contains
    function get_greeting_for(person)
      character(*), intent(in) :: person
      character(:), allocatable :: get_greeting_for
      associate(msg => "Hello "//trim(person)//"!")
        allocate(get_greeting_for, source=msg)
      end associate
    end function get_greeting_for
  end subroutine greet
end program main

PDT seems to declare timers like main::greet and main::greet::get_greeting_for

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions