Skip to content

Multithreading! (+ cleanup)

Kevin Pedro requested to merge github/fork/kpedro88/upgrade2017 into Run2
  1. cout is not threadsafe, so replaced with MessageLogger everywhere (except rare cases hidden behind preprocessor flags). "TreeMaker" category used everywhere, with LogInfo or LogWarning as appropriate. This will be enforced for future development.
  2. Legacy modules (EDProducer, EDFilter, EDAnalyzer) no longer used. All existing modules moved to thread-aware classes (see FWMultithreadedFrameworkModuleTypes). Most were able to be promoted to global. The few exceptions: stream: JetProperties, SusyScanProducer (unavoidable modifications of class members in produce function) one: NeffFinder, TreeMaker (aggregate over all events - TreeMaker now an analyzer, since it doesn't produce anything) This will also be enforced for future development.
  3. Various cleanup, removing blank functions/pointless commands/unneeded includes/code duplication/etc.

A quick test with 1000 events from the Summer16 SMS-T1tttt_mGluino-1500_mLSP-100_TuneCUETP8M1_13TeV-madgraphMLM-pythia8 sample gave the following results:

threads mem (peak) [MB] time [min]
1 870 4.53
4 980 1.73

That's a 2.6x speedup with only 13% increase in memory usage, which is not too shabby.

todo: propagate to Condor scripts (requires some more thought/testing)

Merge request reports