Skip to content
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

Pr80x l1t memory fixes #16085

Merged

Conversation

rekovic
Copy link
Contributor

@rekovic rekovic commented Oct 4, 2016

This PR contains 3 types of fixes concerning memory management by L1Trigger:

  • fix for memory leak in Muon Barell Extrapolater which was introduced with merging of O2O
    (free allocated memory before every return). This is already provided in 81x Fix memory leak in L1Trigger/L1TMuonBarrel/src/L1MuBMEUX #16061 by @davidlange6
  • fix for repetitive memory allocation in Muon Overlap XML Parser to reset DOM vector pool and release all the associated memory back to the system before re-using read methods.
  • fix for Invalid writes in Muon Barell ParamsHelper class by reserving the correct vector size.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2016

A new Pull Request was created by @rekovic for CMSSW_8_0_X.

It involves the following packages:

L1Trigger/L1TMuonBarrel
L1Trigger/L1TMuonOverlap

@cmsbuild, @rekovic, @mulhearn, @davidlange6 can you please review it and eventually sign? Thanks.
@Martin-Grunewald this is something you requested to watch as well.
@slava77, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@rekovic
Copy link
Contributor Author

rekovic commented Oct 4, 2016

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/15513/console

@rekovic
Copy link
Contributor Author

rekovic commented Oct 4, 2016

Some info on the change of memory usage by OMTF XMLConfigReader:

  • Before fix: OMTF XMLConfigReader has no destructor (i.e. no deleting of parser), but delete DOM documents at the end of read methods (multiple calls):
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    7342 rekovic   20   0 2326m 1.4g 121m R 100.1  6.0   2:23.00 cmsRun  
    
  • After adding destructor and reseting parser's document pool in read methods:
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    12196 rekovic   20   0 1922m 922m 121m R 97.5  3.9   2:12.69 cmsRun
    

Reduction in actual physical memory consumption (in RES) is about 500m.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2016

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2016

@rekovic
Copy link
Contributor Author

rekovic commented Oct 4, 2016

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2016

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2016

Pull request #16085 was updated. @cmsbuild, @rekovic, @mulhearn, @davidlange6 can you please check and sign again.

@@ -35,8 +35,8 @@ void L1TMuonBarrelParamsHelper::configFromPy(std::map<std::string, int>& allInts

setAssLUTPath(AssLUTpath);
///Read Pt assignment Luts
std::vector<LUT> pta_lut(0); pta_lut.reserve(19);
std::vector<int> pta_threshold(6); pta_threshold.reserve(10);
std::vector<LUT> pta_lut(19);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rekovic - careful - I believe that pta_lut should be reserve not resize - see that there is a push_back (but only 1 push_back.. ) on line 379 (this code is extremely confusing)

please confirm...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidlange6 Yes, you are right. Pushing back on pta_lut vector will place beyond index 18,
which is not good. Changing back to reserve for pta_lut.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2016

Pull request #16085 was updated. @cmsbuild, @rekovic, @mulhearn, @davidlange6 can you please check and sign again.

@rekovic
Copy link
Contributor Author

rekovic commented Oct 6, 2016

please test

@rekovic
Copy link
Contributor Author

rekovic commented Oct 6, 2016

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/15560/console

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2016

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2016

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2016

@davidlange6
Copy link
Contributor

+1

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

Successfully merging this pull request may close these issues.

None yet

3 participants