Skip to content

Instantly share code, notes, and snippets.

@adityaddy
Last active August 31, 2020 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adityaddy/87e3b60ecaee1907c19fb9d3ac8fa14e to your computer and use it in GitHub Desktop.
Save adityaddy/87e3b60ecaee1907c19fb9d3ac8fa14e to your computer and use it in GitHub Desktop.
GSoC Final Report

GSoC Final Report

Organisation : CERN-HSF

Project : MCnet/Rivet - Speed and accuracy in the LHC's MC analysis tool

Project Proposal Link : doc


Goals

  • Profiling of Rivet/Yoda
  • Optimization for Performance Improvement
  • Thread Safety

Outcome/Oveservation

  1. We did the through profiling of the Rivet and YODA
  • Vtune, ARMMap, cache grind, Gprof were used for profiling, out of which Vtune was most helpful. the profiling mostly contained the non IO performance of Rivet
  1. Profiling Methodology and Initial Report is available at https://gitlab.com/Aditya_Addy/rivet-profiling
  • Profiling Methodology and the code used can be found in the repo.
  1. Helped in improving the Rivet non I/O performance by over 60% by removiong the Deep Copy of HepMC Event
  • The major CPU sink was coming from a line in Event.cc file where a deep copy of event was going on, solving it gave us a major performance gain
  1. Implemented the loop realignment for Invisible particle and PID optimization for finding charged particle
  • To find the invisible particle we were doing the heavy operation first, similarly In finding charge of the particle we hardcoded some of the particle which is very frequent. Both combined gave us a performance boost of around 5%
  1. Implemented the realigned of the if-else in Histo1D::fill method
  • This method is called very frequently for multiweighted event analysis, even for as small as 10 analysis the figure goes to millions, so realigning the xMax, xMin gave us performance improvement of couple of percent
  1. Implemented the One level Cache in YODA to Improve the BinSearcher efficiency, couple of percent gain in Performance
  • A one level cache is added to YODA BinSearcher, this significantly increases the efficiency of BinSearcher in case of non-uniform binning
  1. [ Almost Done ] Implemented the basics of Thread Safety by making the ProjectionHandler the member of AnalysisHandler and lazy initialization of projection
  • ProjectionHandler was global so in Rivet crashes in case of multi threaded program, to solve this issue we have added ProjectionHandler to each Analysishandler and pass it to the base class ProjectionApplier of Analysis and Projection, Implementation using raw pointers is done however use of unique pointers would be more efficient.

GitLab Contribution

  • Issue Assigned
  1. Thread Safety
  2. MultiWeight Event Analysis Improvement
  • Important Commits
  1. Rivet/master
  2. Rivet/master
  3. Rivet/thread-safety
  4. Rivet/thread-safety
  5. Yoda/binSearcher-caching
  6. Yoda/binSearcher-caching
  • Merge Request
  1. Rivet

Monthly Report

Acknowledgement

I want to thank Google, CERN-HSF for creating such oppurtunity, the mentors especially Andy Buckley without whom this project couldn't have came this far, Andy helped me at every step and guided me throughout the program, due to the mentors like Andy this GSoC community is flourshing this much. Lastly I want to thank Holger Schulz for helping me out in the profiling methodology. Overall this was a great learning experience and I wish to contribute to the open source community in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment