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

Merged
merged 260 commits into from
Dec 11, 2024
Merged

Feature: Logging Updates #501

merged 260 commits into from
Dec 11, 2024

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.

@gardner48 gardner48 force-pushed the feature/logging-updates branch from f604770 to 8ae53d7 Compare June 30, 2024 04:58
@gardner48 gardner48 force-pushed the feature/logging-updates branch from eef87d7 to b680c0d Compare August 24, 2024 02:17
@gardner48
Copy link
Member Author

gardner48 commented Dec 10, 2024

The logging statements in all the ARKODE steppers have been updated now and CI tests added for each

src/arkode/arkode_forcingstep.c Show resolved Hide resolved
src/arkode/arkode_forcingstep.c Show resolved Hide resolved
src/arkode/arkode_forcingstep.c Show resolved Hide resolved
src/arkode/arkode_splittingstep.c Show resolved Hide resolved
src/arkode/arkode_splittingstep.c Show resolved Hide resolved
src/arkode/arkode_splittingstep.c Show resolved Hide resolved
drreynolds
drreynolds previously approved these changes Dec 10, 2024
drreynolds
drreynolds previously approved these changes Dec 10, 2024
drreynolds
drreynolds previously approved these changes Dec 10, 2024
@gardner48 gardner48 merged commit 545db2a into develop Dec 11, 2024
34 checks passed
@gardner48 gardner48 deleted the feature/logging-updates branch December 11, 2024 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants