-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
Still working on the CLA. The admins sent it to the lawyers today. Im submitting this PR here and now because I'm working on the GCHP version of this PR (so that we can use it immediately). |
Are there any concerns with adding this? Just wondering because I'll move ahead with the GCHP version of it if it looks okay, while we wait for the lawyers. |
I think it is fine in principle. I don't think you need the logical flag though. You can just set the description to the empty string and then overwrite in the cases that you've identified. And then always include the description in the log message. Eliminates the conditionals (big win) and a few other lines of code (small win). |
Thanks for the suggestion, I'll do that. |
@@ -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)//'''' |
There was a problem hiding this comment.
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.
else | ||
call lgr%debug('Started the %a', trim(stage_description)) | ||
end if | ||
call lgr%info('Started the %a', trim(stage_description)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call lgr%info('Started the %a', trim(stage_description)) | |
call lgr%info('Started the %a', stage_description) |
else | ||
call lgr%debug('Finished the %a', trim(stage_description)) | ||
end if | ||
call lgr%info('Finished the %a', trim(stage_description)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call lgr%info('Finished the %a', trim(stage_description)) | |
call lgr%info('Finished the %a', stage_description) |
@LiamBindle A big MAPL Generic refactoring just went into |
This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days, it will be closed. You can add the "long term" tag to prevent the Stale bot from closing this issue. |
bump As of December 1st I'll technically be a private consulatant (still working full-time on GCHP though), so I should be able to sign the CLA then. |
The lengths some people will go to just to avoid lawyers. :-) |
This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days, it will be closed. You can add the "long term" tag to prevent the Stale bot from closing this issue. |
Un-staling. This is a good PR, just waiting on CLA bits. |
Similar to #1002, I don't plan on pursuing the CLA. I still think this is a useful capability (already it's helped troubleshoot multiple GCHP issues rapidly), but I think this is the end of the line of this PR. |
Closing in favor of #1510 |
Description
This PR adds logging of the start/finish of gridcomp stages. For example
Note that one-time stages like SetServices, Initialize, and Finalize are going to MAPL.GENERIC info, and many-time stages like Run and WriteRestartFile go to debug.
Motivation and Context
I'm working on making it easier to troubleshoot errors in GCHP. Logging the start/end of each stage helps keep track of what is going on. If the model crashes for some reason, the log will show what stage of what component it happened in.
How Has This Been Tested?
I've tested it with GCHP.
Types of changes
(I'm not too sure if this fits into trivial, but that seemed like the best fit to me)
Checklist: