LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
523 stars 131 forks source link

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

Closed balos1 closed 5 months ago

balos1 commented 6 months ago

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.

balos1 commented 6 months ago

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 commented 5 months ago

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