Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added log entries for stage start/finish in MAPL.GENERIC #1009

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions base/MAPL_Generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,6 @@ subroutine MAPL_GenericWrapper ( GC, IMPORT, EXPORT, CLOCK, RC)
[character(len=12):: 'GenRunTot','--GenRunMine']
character(len=12) :: sbrtn
character(len=ESMF_MAXSTR) :: stage_description
logical :: stage_is_one_time
class(Logger), pointer :: lgr => null()


Expand Down Expand Up @@ -1779,7 +1778,6 @@ subroutine MAPL_GenericWrapper ( GC, IMPORT, EXPORT, CLOCK, RC)

t_p => get_global_time_profiler()

stage_is_one_time = .true.
MethodBlock: if (method == ESMF_METHOD_RUN) then
func_ptr => ESMF_GridCompRun
timers => timers_run
Expand All @@ -1788,7 +1786,6 @@ subroutine MAPL_GenericWrapper ( GC, IMPORT, EXPORT, CLOCK, RC)
write(char_phase,'(i1)')phase
sbrtn = 'Run'//char_phase
end if
stage_is_one_time = .false.
else if (method == ESMF_METHOD_INITIALIZE) then
func_ptr => ESMF_GridCompInitialize
!ALT: enable this when fully implemented (for now NULLIFY)
Expand All @@ -1813,7 +1810,6 @@ subroutine MAPL_GenericWrapper ( GC, IMPORT, EXPORT, CLOCK, RC)
! timers => timers_writereastart
NULLIFY(timers)
sbrtn = 'WriteRestart'
stage_is_one_time = .false.
endif MethodBlock
stage_description = ''''//trim(sbrtn)//''' stage of the gridded component '''//trim(COMP_NAME)//''''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I did not know that triple/quad quotes would do this.


Expand All @@ -1840,22 +1836,14 @@ subroutine MAPL_GenericWrapper ( GC, IMPORT, EXPORT, CLOCK, RC)
end IF
#endif

if (stage_is_one_time) then
call lgr%info('Started the %a', trim(stage_description))
else
call lgr%debug('Started the %a', trim(stage_description))
end if
call lgr%info('Started the %a', trim(stage_description))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
call lgr%info('Started the %a', trim(stage_description))
call lgr%info('Started the %a', stage_description)

call func_ptr (GC, &
importState=IMPORT, &
exportState=EXPORT, &
clock=CLOCK, PHASE=PHASE_, &
userRC=userRC, RC=STATUS )
_ASSERT(userRC==ESMF_SUCCESS .and. STATUS==ESMF_SUCCESS,'needs informative message')
if (stage_is_one_time) then
call lgr%info('Finished the %a', trim(stage_description))
else
call lgr%debug('Finished the %a', trim(stage_description))
end if
call lgr%info('Finished the %a', trim(stage_description))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
call lgr%info('Finished the %a', trim(stage_description))
call lgr%info('Finished the %a', stage_description)


! TIMERS off
if (associated(timers)) then
Expand Down