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

MTD geometry: replace string with string_view in MTDBaseNumber #36106

Merged
merged 3 commits into from Nov 22, 2021

Conversation

fabiocos
Copy link
Contributor

PR description:

Following recent discussions triggered by simulation performance reports, this PR update the MTDBaseNumber class, moving it from the use of string to the use of string_view. This is possible since the object is just used locally to build a DetId and the underlying source of strings (geometry volume names) is always available to the code while being invoked.

All the classes using this tool are updated accordingly.

PR validation:

Unit tests pass, and the workflow 34634.0 runs successfully without any change in DQM output.
An igprof test on the GEN-SIM part of the workflow (10 events) show a reduction of the rank of the getBaseNumber method used inside MtdSD (already a minor contribution anyway):

Original

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
            0.0  .........       0.10 / 0.10         MtdSD::setDetUnitId(G4Step const*) [1743]
[1748]      0.0       0.10       0.00 / 0.10       MtdSD::getBaseNumber(G4Step const*)
            0.0  .........       0.08 / 0.08         MTDBaseNumber::addLevel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&) [1882]
            0.0  .........       0.02 / 0.02         MTDBaseNumber::reset() [2969]

Updated

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
            0.0  .........       0.04 / 0.06         MtdSD::setDetUnitId(G4Step const*) [2020]
[2294]      0.0       0.04       0.00 / 0.04       MtdSD::getBaseNumber(G4Step const*)
            0.0  .........       0.02 / 0.02         MTDBaseNumber::reset() [2988]
            0.0  .........       0.01 / 12.08        G4TouchableHistory::GetVolume(int) const [112]
            0.0  .........       0.01 / 9.97         _init [122]

A similar approach could be used for EcalBaseNumber, which has a much higher impact on the GEN-SIM step performances.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36106/26604

  • This PR adds an extra 28KB to repository

@fabiocos
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fabiocos (Fabio Cossutti) for master.

It involves the following packages:

  • Geometry/MTDCommonData (geometry, upgrade)
  • Geometry/MTDGeometryBuilder (geometry, upgrade)
  • Geometry/MTDNumberingBuilder (geometry, upgrade)

@civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @AdrianoDee, @srimanob can you please review it and eventually sign? Thanks.
@bsunanda this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2af255/20506/summary.html
COMMIT: 2b75d1b
CMSSW: CMSSW_12_2_X_2021-11-12-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/36106/20506/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2902040
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2902012
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36106/26637

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36106 was updated. @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @AdrianoDee, @srimanob can you please check and sign again.

@fabiocos
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2af255/20535/summary.html
COMMIT: d8c73e1
CMSSW: CMSSW_12_2_X_2021-11-14-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36106/20535/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 3320802
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3320774
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@cvuosalo
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor Author

@AdrianoDee @srimanob any comment?

@srimanob
Copy link
Contributor

+Upgrade

Technical PR to improve performance. PR test runs fine with no change in DQM.

@cmsbuild
Copy link
Contributor

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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
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

6 participants