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

RecoHGCal/TICL: optimize calculation for comparison in HGCDoublet::areAligned #30815

Conversation

gartung
Copy link
Member

@gartung gartung commented Jul 17, 2020

By squaring cosTheta and multiplying by the squares of the magnitudes an equivalent comparison is made without the division and square root which are costly FP ops.

without PR

Relarted modules:

TimeReport   0.151110     0.151110     0.151110  ticlTrackstersEM
TimeReport   0.244630     0.244630     0.244630  ticlTrackstersHAD
TimeReport   5.448030     5.448030     5.448030  ticlTrackstersMIP
TimeReport   0.489669     0.489669     0.489669  ticlTrackstersMerge
TimeReport   5.136405     5.136405     5.136405  ticlTrackstersTrk

Unrelated modules:

TimeReport   2.788299     2.788299     2.788299  unsortedOfflinePrimaryVertices
TimeReport   3.190056     3.190056     3.190056  unsortedOfflinePrimaryVertices4D
TimeReport   2.398358     2.398358     2.398358  unsortedOfflinePrimaryVertices4DnoPID


MemoryReport> Peak virtual size 16747.1 Mbytes
 Key events increasing vsize:
[5] run: 1 lumi: 1 event: 6  vsize = 12483.1 deltaVsize = 680 rss = 7707.91 delta = 1096.84
[6] run: 1 lumi: 1 event: 2  vsize = 13507.1 deltaVsize = 1024 rss = 7626.52 delta = -81.3906
[11] run: 1 lumi: 1 event: 13  vsize = 15043.1 deltaVsize = 1536 rss = 7504.27 delta = -122.246
[51] run: 1 lumi: 1 event: 54  vsize = 16107.1 deltaVsize = 320 rss = 7668.46 delta = 164.191
[58] run: 1 lumi: 1 event: 59  vsize = 16427.1 deltaVsize = 320 rss = 8162.55 delta = 494.09
[88] run: 1 lumi: 1 event: 90  vsize = 16747.1 deltaVsize = 0 rss = 7822.57 delta = 143.547
[87] run: 1 lumi: 1 event: 91  vsize = 16747.1 deltaVsize = 0 rss = 7898.27 delta = 219.254
[86] run: 1 lumi: 1 event: 87  vsize = 16747.1 deltaVsize = 320 rss = 7679.02 delta = -483.535
TimeReport> Time report complete in 3095.72 seconds
 Time Summary:
 - Min event:   74.3302
 - Max event:   191.179
 - Avg event:   117.212
 - Total loop:  3024.91
 - Total init:  70.7418
 - Total job:   3095.72
 - EventSetup Lock:   0
 - EventSetup Get:   0
 Event Throughput: 0.0330588 ev/s
 CPU Summary:
 - Total loop:  11994.8
 - Total init:  44.139
 - Total extra: 0
 - Total job:   12039
 Processing Summary:
 - Number of Events:  100
 - Number of Global Begin Lumi Calls:  1
 - Number of Global Begin Run Calls: 1
with PR

Related modules

TimeReport   0.137062     0.137062     0.137062  ticlTrackstersEM
TimeReport   0.220417     0.220417     0.220417  ticlTrackstersHAD
TimeReport   4.989291     4.989291     4.989291  ticlTrackstersMIP
TimeReport   0.463667     0.463667     0.463667  ticlTrackstersMerge
TimeReport   4.469128     4.469128     4.469128  ticlTrackstersTrk

Unrelated modules

TimeReport   2.601440     2.601440     2.601440  unsortedOfflinePrimaryVertices
TimeReport   2.993901     2.993901     2.993901  unsortedOfflinePrimaryVertices4D
TimeReport   2.244631     2.244631     2.244631  unsortedOfflinePrimaryVertices4DnoPID


MemoryReport> Peak virtual size 17345.9 Mbytes
 Key events increasing vsize:
[3] run: 1 lumi: 1 event: 7  vsize = 12805.9 deltaVsize = 288 rss = 6317.03 delta = -843.027
[4] run: 1 lumi: 1 event: 1  vsize = 13229.9 deltaVsize = 424 rss = 6637.75 delta = 320.719
[10] run: 1 lumi: 1 event: 10  vsize = 16045.9 deltaVsize = 2560 rss = 7548.33 delta = 910.582
[61] run: 1 lumi: 1 event: 65  vsize = 17345.9 deltaVsize = 394 rss = 7922.04 delta = 373.711
[27] run: 1 lumi: 1 event: 28  vsize = 16621.9 deltaVsize = 320 rss = 8049.02 delta = 500.691
[63] run: 1 lumi: 1 event: 68  vsize = 17345.9 deltaVsize = 0 rss = 7725.5 delta = -196.539
[62] run: 1 lumi: 1 event: 48  vsize = 17345.9 deltaVsize = 0 rss = 7909.17 delta = -12.8672
[61] run: 1 lumi: 1 event: 65  vsize = 17345.9 deltaVsize = 394 rss = 7922.04 delta = -205.59
TimeReport> Time report complete in 2889.58 seconds
 Time Summary:
 - Min event:   69.4932
 - Max event:   169.038
 - Avg event:   109.613
 - Total loop:  2820.21
 - Total init:  69.3035
 - Total job:   2889.58
 - EventSetup Lock:   0
 - EventSetup Get:   0
 Event Throughput: 0.0354584 ev/s
 CPU Summary:
 - Total loop:  11197.6
 - Total init:  36.5688
 - Total extra: 0
 - Total job:   11234.3
 Processing Summary:
 - Number of Events:  100
 - Number of Global Begin Lumi Calls:  1
 - Number of Global Begin Run Calls: 1

…eAligned

By squaring cosTheta and multiplying by the squares of the magnitudes an equivalent comparison is made without the division and square root which are costly FP ops.
@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-30815/17150

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @gartung (Patrick Gartung) for master.

It involves the following packages:

RecoHGCal/TICL

@perrotta, @jpata, @cmsbuild, @kpedro88, @slava77 can you please review it and eventually sign? Thanks.
@felicepantaleo, @riga, @apsallid, @sobhatta, @lecriste, @hatakeyamak, @clelange this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Jul 17, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 17, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: a9840a9
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3ef9f6/8094/summary.html
CMSSW: CMSSW_11_2_X_2020-07-17-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-3ef9f6/8094/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2525996
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2525943
  • DQMHistoTests: Total skipped: 47
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 33 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 144 log files, 17 edm output root files, 34 DQM output files

@kpedro88
Copy link
Contributor

+upgrade

@cmsbuild
Copy link
Contributor

+1
Tested at: cc44839
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3ef9f6/8172/summary.html
CMSSW: CMSSW_11_2_X_2020-07-21-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-3ef9f6/8172/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2525996
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2525943
  • DQMHistoTests: Total skipped: 47
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 33 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 144 log files, 17 edm output root files, 34 DQM output files

@slava77
Copy link
Contributor

slava77 commented Jul 21, 2020

+1

for #30815 cc44839

  • code changes are in line with the PR description and the follow up comments from the community ( @VinInn; https://mattermost.web.cern.ch/cms-o-and-c/pl/9c4k99je3b8ptbzwsccu5j7cxa)
  • jenkins tests pass and comparisons with the baseline show no relevant differences, as expected from a technical update
    • timing report provided with the PR description suggests about 4% speedup in ticlTracksters* modules (after scaling to provided times in unrelated modules)

@kpedro88
Copy link
Contributor

+upgrade

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

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit e2bf145 into cms-sw:master Jul 22, 2020
@gartung gartung deleted the gartung-RecoHGCal-TICL-HGCDoublet-areAlinged-opt branch July 24, 2020 16:00
rovere pushed a commit to rovere/cmssw that referenced this pull request Oct 16, 2020
rovere pushed a commit to rovere/cmssw that referenced this pull request Oct 22, 2020
rovere pushed a commit to rovere/cmssw that referenced this pull request Oct 30, 2020
rovere pushed a commit to rovere/cmssw that referenced this pull request Nov 8, 2020
rovere pushed a commit to rovere/cmssw that referenced this pull request Nov 15, 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.

5 participants