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

Magnetic Field optimization #29556

Merged
merged 10 commits into from May 1, 2020
Merged

Magnetic Field optimization #29556

merged 10 commits into from May 1, 2020

Conversation

namapane
Copy link
Contributor

PR description:

PR validation:

Regression-tested for identical values against reference files for all maps/currents/eras.

Optimizations found to sum up to a 0.5% speedup for non-cached MF calls, according to callgrind.

…onstruction time. Improves 0.4% CPU for non-cached calls. Also migrate debug couts to MessageLogger
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14848

  • This PR adds an extra 56KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

Comment on lines 69 to 90
switch (geomVersion >= 120812 ? 0 : (geomVersion >= 90812 ? 1 : 2)) {
case 0: // since 120812
barrelRsq1 = 172.400f * 172.400f;
barrelRsq2 = 308.735f * 308.735f;
barrelZ0 = 350.000f;
barrelZ1 = 633.290f;
barrelZ2 = 662.010f;
break;
case 1: // version 90812 (no longer in use)
barrelRsq1 = 172.400f * 172.400f;
barrelRsq2 = 308.755f * 308.755f;
barrelZ0 = 350.000f;
barrelZ1 = 633.890f;
barrelZ2 = 662.010f;
break;
case 2: // versions 71212, 90322
barrelRsq1 = 172.400f * 172.400f;
barrelRsq2 = 308.755f * 308.755f;
barrelZ0 = 350.000f;
barrelZ1 = 633.290f;
barrelZ2 = 661.010f;
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is apparently relocating some magic numbers from what was earlier in MagGeometry::inBarrel.
There we had // FIXME: Get these dimensions from the builder.
Is this available from the builder?
Minimally, it's still worth to keep the FIXME comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put the comment back,
I wrote the FIXME a dozen years ago in the hope I would have figured out a reasonable way to detect the dimensions automatically or to label volumes appropriately in the geometry. I haven't since. A sufficiently generic solution would require adding specifications to the geometry and some logic, which I don't think is worth given that these numbers are not expected to change (last change was 8 years ago and none is in sight in the future)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14849

  • This PR adds an extra 60KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@slava77
Copy link
Contributor

slava77 commented Apr 24, 2020

Code check has found code style and quality issues which could be resolved by applying following patch(s)

just in case it was missed

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14854

  • This PR adds an extra 60KB to repository

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29556/14945

@cmsbuild
Copy link
Contributor

Pull request #29556 was updated. @perrotta, @cmsbuild, @slava77 can you please check and sign again.

@slava77
Copy link
Contributor

slava77 commented Apr 30, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 30, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/5938/console Started: 2020/04/30 23:05

@cmsbuild
Copy link
Contributor

+1
Tested at: 8850003
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c491c8/5938/summary.html
CMSSW: CMSSW_11_1_X_2020-04-30-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c491c8/5938/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2696239
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2695919
  • DQMHistoTests: Total skipped: 319
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@slava77
Copy link
Contributor

slava77 commented May 1, 2020

+1

for #29556 8850003

  • code changes are in line with the PR description and the follow up review
  • jenkins tests pass and comparisons with the baseline show no differences

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2020

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

@silviodonato silviodonato changed the title Mf optimization Magnetic Field optimization May 1, 2020
@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit ae6f5ca into cms-sw:master May 1, 2020
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

5 participants