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

[DISCUSSION] Use pFlogger library for logging in GCHP #100

Closed
lizziel opened this issue May 18, 2021 · 3 comments
Closed

[DISCUSSION] Use pFlogger library for logging in GCHP #100

lizziel opened this issue May 18, 2021 · 3 comments
Assignees
Labels
category: Feature Request New feature or request

Comments

@lizziel
Copy link
Contributor

lizziel commented May 18, 2021

The pFlogger library, developed by Tom Clune at NASA GMAO, is a logging package based on the python logger package which uses a hierarchy of loggers, such as info, warnings, error, and debug. This library has been included in GCHP builds for a while but was not used.

With the update to MAPL 2.6.3 in GCHP 13.1.0 we will begin to use it. GMAO made updates to MAPL ExtData to replace all debug prints that were enabled via keyword in ExtData.rc with calls to the new logger. Varying levels of prints can be enabled from new config file logging.yml. The toggle in ExtData.rc and auto-update of it in runConfig.sh are removed. All logger output is sent to new output log file allPEs.log. Please note that regular prints in GCHP are still sent to stdout which is a different stream than the one used by pFlogger.

There is potential for GCHP to use the new logger for components beyond MAPL ExtData. This discussion is about expanding usage by adding sections to the logging.yml file and including at least one example usage per GCHP component.

Using the logger in GEOS-Chem would require blocking off the code with pre-processor conditions requiring use of MAPL which by extension requires the pFlogger library. We may therefore want to limit usage in GEOS-Chem proper. If you have thoughts on this please make comments here.

@lizziel lizziel added the category: Feature Request New feature or request label May 18, 2021
@lizziel lizziel self-assigned this May 18, 2021
@sdeastham
Copy link
Contributor

In terms of use in GEOS-Chem, I'd suggest putting a redirect to pFlogger in the existing GEOS-Chem debug routines (in error_mod.F90) when compiling for GCHP. I totally agree that we wouldn't want to scatter new C preprocessor statements throughout the core code. In the long run I'd love to have a routine in error_mod.F90 which we use for all standard output statements, as then we could redirect that for the various codes - but that would incur some implementation overhead.

@LiamBindle
Copy link
Contributor

LiamBindle commented May 19, 2021

Thanks for this @lizziel!

I'm going to try to make a concerted effort to expand our error messages when I run into crashes starting with 13.1.

@lizziel
Copy link
Contributor Author

lizziel commented Sep 8, 2021

We now have this discussion too: https://github.com/geoschem/geos-chem/discussions/871

Any objections to closing this and moving there to avoid duplication?

@lizziel lizziel closed this as completed Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants