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

Feature: Logging Updates #501

Draft
wants to merge 76 commits into
base: develop
Choose a base branch
from
Draft

Feature: Logging Updates #501

wants to merge 76 commits into from

Conversation

gardner48
Copy link
Member

Follow on to utilities added in #499

  • Make info logging output in the integrators more consistent
  • Update parser for MRI methods
  • Add function to extract lists of data for plotting
  • Add example scripts using log parser

@balos1
Copy link
Member

balos1 commented Jun 10, 2024

Checkout https://github.com/LLNL/sundials/blob/feature/nls-switching-v7-gs/src/sundials/sundials_logger_impl.h#L35. Now that we have C99 we can change all the logging statements in the code to use a variadic macro and it makes the logging statements much cleaner and gets rid of the repetitive preprocessor checks. My intent was to bring this over from that branch. I can do that here if you think it looks good.

@gardner48
Copy link
Member Author

Checkout https://github.com/LLNL/sundials/blob/feature/nls-switching-v7-gs/src/sundials/sundials_logger_impl.h#L35. Now that we have C99 we can change all the logging statements in the code to use a variadic macro and it makes the logging statements much cleaner and gets rid of the repetitive preprocessor checks. My intent was to bring this over from that branch. I can do that here if you think it looks good.

I was going to ask if you still had the variadic macros from the original logging implementation on another branch. I think switching over to those would be great.

It would also be nice to have an "If" version of the macros i.e., something like SUNLogInfoIf that takes an additional boolean input to change cases like

#if SUNDIALS_LOGGING_LEVEL >= SUNDIALS_LOGGING_INFO
      if (kflag != ARK_SUCCESS)
      {
        SUNLogInfo(ARK_LOGGER, __func__, "end-step-attempt", "status = failed solve, kflag = %i", kflag);
      }
#endif

into something like

SUNLogInfoIf(kflag != ARK_SUCCESS, ARK_LOGGER __func__, "end-step-attempt", "status = failed solve, kflag = %i", kflag);

@balos1
Copy link
Member

balos1 commented Jun 13, 2024

@gardner48 The "if" version sounds like a nice addition as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants