New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HCAL MAHI Code optimization to reduce CPU consuming #23568
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23568/5164 |
A new Pull Request was created by @hmiaozh for master. It involves the following packages: RecoLocalCalo/HcalRecAlgos @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@hmiaozh : could you please add "Mahi" or "HCAL local reco" or whatever else can be used to identify the field of application of this PR in its title? Thank you. |
@hmiaozh @mariadalfonso @deguio |
@vkhristenko @fwyzard fyi |
to elaborate on #23568 (comment)
this does not match the observed differences in jenkins tests. |
@slava77 Thank you for all the information. I went through all the changes. As you already pointed out, they are in run-1 workflows: 1000.0 2011A, 1001.0 2011A, 140.53 HI, 4.53 2012B Then I did runTheMatrix on those runs and checked the results (Here what I checked here are the hbheprereco output infos) The results are in the attached slides. As a summary, I did observe differences between Ref and New on those runs. (Although somehow I’m not able to reproduce exactly the same plots as jenkins tests have. I don’t know where the spikes centered at 0 in jenkins plots come from. In my plots, I don’t have them. You can also compare them from the slides) A brief explanation on slides: slides 4-6 : repeat the same pattern as slide1-3 for run 140.53 HI slide 15 : comparison plots on a recent one as a cross check, where I run 5k events; and no difference is observed. |
@hmiaozh Miao, |
Hi all, it looks like the set of changes indeed corresponds to the bad QPLL channels. Which exact change leads to the change in this PR? I wanted to understand if it is going towards resolving #21135 |
@abdoulline Thank you for confirming this so detailed! As for solving #21135, I plotted out the fitting results, as shown in the following slides: the upper row is current configuration; lower row is with this optimization. I picked up one from each of the three run-1 dataset (1000.0 2011A/1001.0 2011A, 140.53 HI, 4.53 2012B) where there are changes. From the plots, I don't think there's much difference/problem related to bad QPLL can be solved. So since this optimization follows the same logic as the old, bad QPLL problem might need to be solved with other/deeper/further thoughts. |
+1
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
1). Set FullSampleMatrix/FullSampleVector to be dynamic so that it works for different bx and TS configurations and also allocates space only for the minimum needed.
2). Move part of the initialization (in "resetWorkspace()") to the main body, serving as the same purpose as elaborated in 1).
3). Code Cleanup: Removed some unused variables and repeated sentences.
Testing results:
1>. Same reconstruction results.
Mahi_CPUSpeed.pdf
2>. "MahiFit::phase1Apply" CPU consuming reduces ~18% from igprof report.
Two igprof.res files (one for the old one for the new) are put: https://www.dropbox.com/sh/nyjv61mfn29mupt/AAB8Ge1XsKndxHaI7rtIaHgEa?dl=0