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

Speed up makeRef and sorting of trajectory #12587

Merged
merged 4 commits into from
Dec 3, 2015

Conversation

VinInn
Copy link
Contributor

@VinInn VinInn commented Nov 28, 2015

Two independent optimizations
makeRef avoiding multiple deferencing of Handle
use nth_element to "sort" Trajectory (it may produce regression)

@VinInn
Copy link
Contributor Author

VinInn commented Nov 28, 2015

@cmsbuild, please test

@cmsbuild cmsbuild added this to the Next CMSSW_8_0_X milestone Nov 28, 2015
@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @VinInn (Vincenzo Innocente) for CMSSW_8_0_X.

It involves the following packages:

DataFormats/Common
RecoLocalTracker/SiStripRecHitConverter
RecoTracker/CkfPattern
RecoTracker/MeasurementDet

@smuzaffar, @Dr15Jones, @cvuosalo, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@ghellwig, @wmtan, @makortel, @forthommel, @yduhm, @GiacomoSguazzoni, @gbenelli, @rovere, @VinInn, @nickmccoll, @mschrode, @jlagram, @wddgit, @cerati, @gpetruc, @istaslis, @threus, @dgulhan this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

Following commands in first line of a comment are recognized

  • +1|approve[d]|sign[ed]: L1/L2's to approve it
  • -1|reject[ed]: L1/L2's to reject it
  • assign <category>[,<category>[,...]]: L1/L2's to request signatures from other categories
  • unassign <category>[,<category>[,...]]: L1/L2's to remove signatures from other categories
  • hold: L1/all L2's/release manager to mark it as on hold
  • unhold: L1/user who put this PR on hold
  • merge: L1/release managers to merge this request
  • [@cmsbuild,] please test: L1/L2 and selected users to start jenkins tests
  • [@cmsbuild,] please test with cms-sw/cmsdist#<PR>: L1/L2 and selected users to start jenkins tests using externals from cmsdist

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@VinInn
Copy link
Contributor Author

VinInn commented Nov 29, 2015

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

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

@cmsbuild
Copy link
Contributor

Pull request #12587 was updated. @smuzaffar, @Dr15Jones, @cvuosalo, @cmsbuild, @slava77, @davidlange6 can you please check and sign again.

@cmsbuild
Copy link
Contributor

-1

Tested at: 2dff611
I found errors in the following unit tests:

---> test TestRunnerPhysicsToolsCondLiteIO had ERRORS

you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-12587/10003/summary.html

@cmsbuild
Copy link
Contributor

@VinInn
Copy link
Contributor Author

VinInn commented Dec 1, 2015

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 1, 2015

Pull request #12587 was updated. @smuzaffar, @Dr15Jones, @cvuosalo, @cmsbuild, @slava77, @davidlange6 can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 1, 2015

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

@Dr15Jones
Copy link
Contributor

+1
fine for changes in Core

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 1, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 1, 2015

@slava77
Copy link
Contributor

slava77 commented Dec 2, 2015

it's not so nice to mix in technical changes which do not produce regressions but need full CMSSW rebuild
and logical changes which produce regressions but are limited to just one .cc file.

@@ -361,7 +361,7 @@ GroupedCkfTrajectoryBuilder::groupedLimitedCandidates (const TrajectorySeed& see
if ((int)newCand.size() > theMaxCand) {
//ShowCand()(newCand);

sort( newCand.begin(), newCand.end(), GroupedTrajCandLess(theLostHitPenalty,theFoundHitBonus));
std::nth_element( newCand.begin(), newCand.begin()+theMaxCand, newCand.end(), GroupedTrajCandLess(theLostHitPenalty,theFoundHitBonus));
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the remaining code using the "newCand" care about the order of the trajectories (the part that's left from begin to +maxCand)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, it is a side effect

@slava77
Copy link
Contributor

slava77 commented Dec 2, 2015

... just 174 packages, peanuts.

@slava77
Copy link
Contributor

slava77 commented Dec 2, 2015

+1

for #12587 8c08643

  • code changes are in line with the description
  • jenkins tests pass and comparisons with baseline show minor differences that start from tracks and propagate downstream (triggered by different ordering of trajectories after cleaning; logically equivalent but different: neither std::sort or std::nth_element specify the order of equal elements)
  • additionally tested locally in CMSSW_8_0_X_2015-11-30-1100 to check on 25202 and 1313: observations from jenkins are confirmed
    • technical performance in 25202: time comparisons suggest reduction in track seeding and track candidate reco with a total of about 100ms/evt (1% of total reco)
    • logically, the improvements are made in the good direction

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 2, 2015

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, @Degano, @smuzaffar

@VinInn
Copy link
Contributor Author

VinInn commented Dec 2, 2015

Thanks for confirming.
Still, the real origin of the makeRefTo speedup remains obscure to me...

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Dec 3, 2015
Speed up makeRef and sorting of trajectory
@cmsbuild cmsbuild merged commit 399188d into cms-sw:CMSSW_8_0_X Dec 3, 2015
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