- marked as minor
Access to timings data
Hello,
I want to access the time spent in some PETSc.Log.Event
regions that I define
I tried in several ways and searched for similar questions, but no luck.
The closest thing I got to is PETSc.Log.view()
, which only prints the summary. I want to access the actual values, for example in a dictionary (e.g., {'MatAssemblyBegin': (..., X secs, ...
). I also tried going through viewFromOptions
, but again nothing.
I finally tried running my program with -log_view:timing_data.py:ascii_info_detail -log_summary
, but the timing_data
file is generated only at the end of the computation. If I managed to get it early, I could access it to get what I need, but I'm surprised there's no easy way of doing this. However, I'd still prefer a simple function that gives me the time for each stage.
Thanks for looking into this
Comments (3)
-
-
reporter Lisandro, thanks for this. I'll try to see what I can do once I get back from holiday. Thanks for the clarification.
-
- edited description
- changed status to closed
- Log in to comment
Dear Fabio, there is not enough manpower to wrap every single call in PETSc and expose it in petsc4py in a pythonic way. However, I would happily review a patch or pull request adding this feature. Any chance you are brave enough to contribute?