argonne-lcf / THAPI

A tracing infrastructure for heterogeneous computing applications.
Other
22 stars 9 forks source link

Smaller energy thapi #148

Closed TApplencourt closed 1 year ago

TApplencourt commented 1 year ago

This use babeltrace_thapi to replace babelatrace_energy.

Handle it as a a normal event. We can add new option to the CLI to filter it or whatever if you want.

Please tests is Solomon, I didn't...

Kerilk commented 1 year ago

You would need to use it with --backend=[] to get the same behavior, right? On a side note, why is it called banckend when it takes an array? Shouldn't it be called --backends?

TApplencourt commented 1 year ago

Oh yeah it's ze_ event you are right. And will fix the typo.

Kerilk commented 1 year ago

No, I meant thapi_energy was only displaying the energy none of the other events, not even the level zero ones. So maybe we should add a new backend, sampling comes to mind.

TApplencourt commented 1 year ago

Yeah, this is what I wrote on the description. I can add an option if you'd like to. But I guess you can grep the output for now

If we want to be general, we want to add an option to visualize only specific regex or whatever. Aka adding a filter before the pretty print sink.

Kerilk commented 1 year ago

Ho yeah, hadn't seen your comment in the code. Let wait for @sbekele81 feedback then.

sbekele81 commented 1 year ago

I'm getting the following error when I ran the script: /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:191:in block (3 levels) in get_components': no implicit conversion of Array into String (TypeError) from /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:177:ineach' from /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:177:in block (2 levels) in get_components' from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:114:inblock in _wrap_graph_simple_sink_component_consume_func' from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:452:in bt_graph_run' from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:452:inrun' from /home/sbekele/thapi-bin-new/bin/babeltrace_thapi:368:in <main>' from component-class-sink-simple.c:181. from graph.c:469. from /soft/packaging/spack/gnu-ldpath/build/linux-sles15-x86_64/gcc-11.2.0/ruby-3.1.0-55x7hesrduyvjspadyesab5n4llbevol/lib/ruby/gems/3.1.0/gems/babeltrace2-0.1.4/lib/babeltrace2/graph/graph.rb:455:inrun' from thapi-bin-new/bin/babeltrace_thapi:368:in `

'

As you mentioned, babeltrace_energy calculates the delta energy and generates the power series. if we are going to include it in the babeltrace_thapi, it would be nice that we have an option to filter.

TApplencourt commented 1 year ago

May work now.

As you mentioned, babeltrace_energy calculates the delta energy and generates the power series. if we are going to include it in the babeltrace_thapi, it would be nice that we have an option to filter.

Do you think a grep is sufficient? If not the general solution is to create a new regex filter. We can also add --energy-only option in the tally but I don't like to add a new options as it's always hard to maintain

sbekele81 commented 1 year ago

I think grep will do it. However, the error still persists.

TApplencourt commented 1 year ago

Fix now