-
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
Feature request: set ESMF logging mode at run-time via config file #2133
Comments
@lizziel I'm assigning @tclune and @bena-nasa to answer this more. They'd have the knowledge on how and if this could be done. |
Thanks @mathomp4. I should give credit to @tclune (or was it @bena-nasa?) for coming up with the idea to pass a config file to |
@lizziel so you want to parse from something the user can configure? YAML? Plain ASCII? ESMF_Config( which of course you can't parse with ESMF_Config at that point)? before that call where you set the logging mode in CapOptions? |
Hi @bena-nasa, I would like to have a switch in any of the existing rc files. |
Ben is out today, but I have some time because the work I was doing at NAS needs sysadmin help. So I took a shot at this. I have a branch called
and if it's present, it will read it and change the log level. Now, in this branch (at least) the file MUST be named @lizziel Can you try this branch and see how it works for you? If nothing else, it's a first go at this. We will probably wait for @bena-nasa to return and figure out something more elegant and permanent, but we can at least see if this works for you. |
Thanks @mathomp4. To be clear, this update is not urgent and something that I'd like in a future release that will eventually go into GCHP. I actually have zero time to test unfortunately. At the meeting earlier this week Tom and I agreed on CAP.rc as the place to put the toggle. |
Ah okay. Well, it was a fun bit of ESMF learning. 😄 |
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. |
@lizziel was this "resolved"? |
I'll know very soon. I am testing your updates today. |
This works! I'll put it into GCHP (and give you full credit). If you could merge it into MAPL before the 3 release that would be great. |
…-file Fixes #2133. Add ability to set ESMF Logging mode at Run Time
The ESMF logging mode is currently part of
cap_options
set via a command line tool. We do not use the command line tool in GCHP and so set the logging mode at a very high level to pass when creating MAPL CAP (see here). To change the logging mode, such as to disable the defaultESMF_LOGKIND_MULTI_ON_ERROR
, users need to change the code and recompile.It would be more convenient to set the logging mode at run-time via a config file. This is not possible with the current implementation of MAPL, however, because the logging mode is needed for ESMF initialization (see here) but ESMF initialization needs to happen prior to reading a config file.
The solution to this problem is to pass a config file rather than logging string to
ESMF_Initialize
. This is possible according to the ESMF docs.The text was updated successfully, but these errors were encountered: