Limiting annotation depth in CalQL
mrzv opened this issue · 4 comments
This is more of a question than issue report. Is there a way to limit the depth of annotations in CalQL? So for instance if I have:
annotation mpi.rank time.offset time.inclusive.duration
main
main/foo
main/foo/bar
main/foo
main/foo/baz
main/foo
main
...
And I want to print out only sum total time for main and main/foo, is there some magic argument to achieve this? I guess one way to express this is to limit the depth, but another way would be to explicitly specify annotation prefixes I'm interested in.
If not, perhaps this is a feature request after all.
Hi @mrzv ,
Thanks for the report. Currently that's not directly possible, but I'll try to come up with something.
You can create flat profiles with select event.end#annotation,sum(time.inclusive.duration) group by event.end#annotation format table
, which drops the hierarchy entirely.
You can also filter for specific values with where
(or exclude them with where not
), e.g., where annotation=foo
, but that will still apply to all records where foo is set.
@daboehme Another question in the same line of understanding CalQL. I want to print out information about some MPI routines. I can do it for one specific routine at a time via
cali-query *.cali -t -q "SELECT * WHERE mpi.function=MPI_Recv ORDER BY time.offset"
but if I want to see multiple routines, say, MPI_Recv
and MPI_Test
, I can't find a way to do it.
Is there a way to do something like OR inside WHERE? I found that you can do AND by providing multiple WHERE clauses.
In general, I'd love to see a better documentation for CalQL. It's clearly very powerful, but I'm struggling to unlock all that power.
Hi @mrzv,
There is some documentation here: https://github.com/LLNL/Caliper/blob/master/doc/sphinx/calql.rst - maybe that helps. Unfortunately there's currently no OR for filtering, though.
For MPI specifically you can set CALI_MPI_WHITELIST when taking the measurement to record only a subset of MPI functions.