electronic-structure / SIRIUS

Domain specific library for electronic structure calculations
BSD 3-Clause "New" or "Revised" License
115 stars 40 forks source link

SIRIUS timers and `roctrace` #961

Open gsavva opened 4 months ago

gsavva commented 4 months ago

Working using PR #940 and more specifically, roctrace, I found out that the timers logged by SIRIUS itself can be used as regions in Perfetto, as shown below:

image

However, the rocprof post-processing script crashes

/opt/rocm-5.2.3/libexec/rocprofiler/tblextr.py: range id(2) is not found
Profiling data corrupted: './tmp/rpl_data_240212_125625_55109/input_results_240212_125625/'

That's because 3 timers are outside of the scope of rocprof:

  1. PROFILE_START("sirius") link
  2. PROFILE("sirius::initialize") link
  3. PROFILE_STOP("sirius") link

Out of scope meaning that the log of rocprof only logs a STOP but the corresponding START is missing.

Quick solution to enable tracing was to comment-out the three above timer lines.

gsavva commented 4 months ago

Instead of tracing the whole application or test, a smaller session can be traced as shown in Tracing Control for API or Code Block sesion of ROCm Docs