I have a couple of trace files produced by precice (Performance Analysis. I would like to extract data from them in an automated way.
I have found the python API of perfetto, which allows SQL or Pandas Queries. Overall this is pretty flexible.
Now I’m wondering if there is a way to uniquely identify the end or beginning of a coupling window, some event that happens exactly once (or maybe a fixed amount of time) per window? The idea is to do analysis of e.g. average coupling window runtime but ignore the first N windows because they are unrepresentative of behavior in longer runs. Or similar things.
If there is no such thing, maybe another level of events could be added between the _GLOBAL level and advance level that represents coupling windows?
I found the setup we use in aste pretty helpful, see for example this code snippet we use for the automatic analysis
You can easily filter more or compute means, for quantities, e.g., the following computes the mean time and extracts the maximum across all ranks
Now I’m wondering if there is a way to uniquely identify the end or beginning of a coupling window, some event that happens exactly once (or maybe a fixed amount of time) per window?
We have an advance event (as you already mentioned) as well as a solver.advance event which tracks the time your solver utilizes. If you know your subcycling configuration, I could imagine that these are sufficient to analyze what you want.
We also have separate events for most API functions, but it could be that you have to upgrade to v3.2.0 (to be released probably this week) to get all those.
I wasn’t aware of the perfetto python API. Thanks for sharing the knowledge!
What I normally do it to use precice-profiling export and then load the csv into polars or pandas.
This allows for straight-forward filtering and grouping based on the participant and rank.
There is currently no easy way of extracting this information from the profiling data.
The problem is that this is highly case dependent.
preCICE supports mixing explicit and implicit coupling schemes as well as mixing different time-window sizes in these coupling schemes. This makes an implementation of this pretty tricky. Maybe one could attach time-window and iteration counters to each coupling scheme advance? But there is currently no event for this.
@IshaanDesai Is currently trying to figure out the exact same issue to simplify data processing of user-defined profiling data in the micro manager.