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

Add a Python library for developer utilities with an initial module for log parsing #499

Merged
merged 10 commits into from
Jun 10, 2024

Conversation

balos1
Copy link
Member

@balos1 balos1 commented May 31, 2024

I started this on another branch where I needed to parse the SUNLogger log files to understand (and plot) some CVode behavior. The intent is to add more of our Python utilities for plotting stuff like step size over time etc. We can also add other modules unrelated to logging.

Copy link
Collaborator

@drreynolds drreynolds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like where this is going. Are you confident that all SUNLogger lines consistently use the required format, i.e., that single items have the format

[loglvl][rank][scope][label] key1 = value, key2 = value

and array-valued items have the format

[loglvl][rank][scope][label] y(:)
y_1
y_2
...

? It looks like you fixed one inconsistency in CVODE, but I think that all such inconsistencies should be resolved before this PR is eventually merged.

scripts/sundialsdev/logs.py Outdated Show resolved Hide resolved
scripts/sundialsdev/logs.py Outdated Show resolved Hide resolved
@balos1
Copy link
Member Author

balos1 commented Jun 3, 2024

Are you confident that all SUNLogger lines consistently use the required format

I am pretty confident that all single line entires do follow the required format. The vector valued ones do not yet (only CVODE where I updated it).

It looks like you fixed one inconsistency in CVODE, but I think that all such inconsistencies should be resolved before this PR is eventually merged.

My intent was for this PR to just put up what I have developed already as part of a different task. Others can extend it, and update lines in the other packages as necessary. If I need to resolve all inconsistencies in the packages before merging this, I will not be able to finish up this PR for a bit. Since its just a developer tool, perhaps we can accept it as-is and others can fix inconsistencies they find as needed?

Update: I fixed the inconsistent logging of vector-valued outputs. I did not go verify all of the single line logging statements though (that would take a lot more time, and I would like to merge this without doing so).

@balos1
Copy link
Member Author

balos1 commented Jun 10, 2024

I think this is ready now @gardner48. The last two comments will be taken care of in #501.

@gardner48 gardner48 merged commit 3807ca7 into develop Jun 10, 2024
23 checks passed
@gardner48 gardner48 deleted the feature/sundialsdev-parse-cvode-log branch June 10, 2024 23:45
@balos1 balos1 added this to the SUNDIALS Next milestone Jun 20, 2024
gardner48 added a commit that referenced this pull request Jun 20, 2024
Add initial log parsing Python library

---------

Co-authored-by: Daniel R. Reynolds <reynolds@smu.edu>
Co-authored-by: David J. Gardner <gardner48@llnl.gov>
This pull request was closed.
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.

3 participants