Caliper icon indicating copy to clipboard operation
Caliper copied to clipboard

Limiting annotation depth in CalQL

Open mrzv opened this issue 4 years ago • 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.

mrzv avatar Aug 20 '19 22:08 mrzv

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 avatar Aug 21 '19 05:08 daboehme

@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.

mrzv avatar Aug 23 '19 04:08 mrzv

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.

daboehme avatar Aug 27 '19 15:08 daboehme

@daboehme Thanks. I saw those docs, and I saw the CALI_MPI_WHITELIST option. I still think it would be great to have OR to be able to drill down into the data after it's gathered.

mrzv avatar Aug 27 '19 15:08 mrzv