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

Changed set to vector in PFDisplacedVertexSeed #23546

Merged
merged 2 commits into from Jun 18, 2018

Conversation

Dr15Jones
Copy link
Contributor

A vector should reduce memory and most likely speed up the use of PFDisplacedVertexSeed.

Added unit tests for the code I touched.

There was no fundamental reason to use a set rather than a vector.
Even guaranteeing uniqueness of the elements in the container
can be done efficiently with the vector.
This should help with both memory size and speed.
@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2018

@Dr15Jones
Copy link
Contributor Author

I happen to have noticed this while trying to understand the IB failures using gcc 8. The use of the set bothered me so I changed it to a vector to improve its memory and CPU efficiency.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/28601/console Started: 2018/06/10 00:18

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2018

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

DataFormats/ParticleFlowReco
RecoParticleFlow/PFTracking

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@mmarionncern, @makortel, @rovere, @lgray, @seemasharmafnal, @cbernet, @bachtis this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

@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-23546/28601/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 45 differences found in the comparisons
  • DQMHistoTests: Total files compared: 31
  • DQMHistoTests: Total histograms compared: 2902751
  • DQMHistoTests: Total failures: 46
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2902515
  • DQMHistoTests: Total skipped: 190
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 30 files compared)
  • Checked 128 log files, 14 edm output root files, 31 DQM output files

@Dr15Jones
Copy link
Contributor Author

As best as I can see from looking at the RECO comparisons, the extremely slight differences (usually just a shifting of an entry from one histogram bin to a neighboring bin) could be explained by slight precision shifts in the values.

@perrotta
Copy link
Contributor

Hi @Dr15Jones : a set is ordered according to its element keys, while a vector is not. As a consequence, the order in which elements_ are accessed differs now, and with some debug I could verify that in a few cases also the displacedVertex's get a different order with this PR wrt the baseline.

Still, it is not obvious to me how do those different orders can be responsible of the tiny changes that you notice in a few reco comparisons. Do you have an idea about how this can happen?

You talk about some different precision, which could indeed be responsible of the tiny changes observed: where such a different precision is implemented in this PR?

@slava77
Copy link
Contributor

slava77 commented Jun 15, 2018 via email

@Dr15Jones
Copy link
Contributor Author

@slava77 @perrotta is there still debate going on about the minor change of values?

@perrotta
Copy link
Contributor

@Dr15Jones : well, I was waiting that you pointed out to me where there is such a variable saved in a different precision in your code (if this was what you meant by "slight precision shifts in the values")

On the other hand, we agrees that the change of order of few of the displacedVertex's (due to the change of order of the elements_ of the Set vs Vector) could be deemed responsible of the tiny shifts seen in the outputs. And, by looking at the code I don't think that the order that was originally decided for the std::set <...> elements_ had any other meaning rather than help in avoiding double counting (as it was mentioned in the comment in https://github.com/cms-sw/cmssw/pull/23546/files#diff-6903ba4b1023e45802608d40feee031aL36)

Therefore, if you have no objections, I could consider me ready to sign this off for reco

@Dr15Jones
Copy link
Contributor Author

@perrotta When I was saying 'slight precision shifts in the values' I just meant that if the code was doing math operations (say additions) based on the order of the items in the set, then changing the order can make slight changes to the values at the smallest precision scale. I had not meant to imply some change to saved values. Sorry for the confusion.

Yes, please go ahead and sign off.

@perrotta
Copy link
Contributor

+1

  • Technical update
  • Due to the different order in which the seeds are stored some tiny difference can be propagated to the reco outputs, as it is visible in some of the jenkins tests outputs

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

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 282f51a into cms-sw:master Jun 18, 2018
@Dr15Jones Dr15Jones deleted the removeSetFromPFDisplacedVertexSeed branch June 19, 2018 19:52
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