Skip to content

Add total memory counters to GenRndInit

Michal Mazurek requested to merge mimazure-add-total-memory into master

@gcorti

This is needed to measure the memory usage by Gaussino (and Gauss). The information is stored in a counters and printed at the end of the event loop.

GenRndInit           INFO Number of counters : 2                                                                                                                                                                                     
 |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |                                                                                                  
 | "Total Memory [MB]"                             |         1 |   1220.972 |     1221.0 |     0.0000 |      1221.0 |      1221.0 |                                                                                                  
 | "Total Memory per Thread [MB]"                  |         1 |   1220.972 |     1221.0 |     0.0000 |      1221.0 |      1221.0 |    

I imagine that we would also need the histograms as in SimInit.cpp and GenInit.cpp in Gauss/Sim10. Unfortunately, we cannot use the same tool (MemoryTool) for this purpose because it does not work with the functional framework correctly and is an LHCb dependency. My proposal is to implement the histograms directly in Gaussino, but this means that we would have to implement locking, because GaudiHistAlg is not thread safe.

Merge request reports