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

Fix sorting in TTUTrackingAlg (11_1_X) #31430

Merged
merged 3 commits into from Sep 11, 2020

Conversation

makortel
Copy link
Contributor

PR description:

Backport of #31415

This PR fixes a bug in the sorting comparison functions in TTUTrackingAlg that cause crashes reported in #31258 and #31410. The std::sort requires the comparison functor to meet the requirements of Compare (loosely needs "less than"), which the current "less or equal than" does not meet, leading to undefined behavior. This PR changes the functors to use "less than" comparison.

Furthermore, as pointed out in #31258 (comment), this PR proposes to fix a logic bug in the code that assumes std::sort() to be stable (it is not) by combining the two comparison operations into one, and replacing the function structs with lambdas.

For consistency this PR also changes the subsequent call to std::unique() to use a lambda instead of function object.

PR validation:

The crash reported in #31410 disappears, limited matrix runs.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 10, 2020

A new Pull Request was created by @makortel (Matti Kortelainen) for CMSSW_11_1_X.

It involves the following packages:

L1Trigger/RPCTechnicalTrigger

@cmsbuild, @rekovic, @benkrikler can you please review it and eventually sign? Thanks.
@Martin-Grunewald this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

type bug-fix

@makortel
Copy link
Contributor Author

backport of #31415

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 10, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: ea02b13
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ec0e4e/9252/summary.html
CMSSW: CMSSW_11_1_X_2020-09-10-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-ec0e4e/9252/summary.html

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-ec0e4e/23234.1001_TTbar_14TeV+RecoFullGlobal_TestOldDigi_2026D49+HARVESTFullGlobal_2026D49

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2780792
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2780741
  • DQMHistoTests: Total skipped: 50
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 35 files compared)
  • Checked 152 log files, 16 edm output root files, 36 DQM output files

@qliphy
Copy link
Contributor

qliphy commented Sep 11, 2020

+1

@qliphy
Copy link
Contributor

qliphy commented Sep 11, 2020

merge

@cmsbuild cmsbuild merged commit 09da4e6 into cms-sw:CMSSW_11_1_X Sep 11, 2020
@makortel makortel deleted the fixTTUTrackingAlg_111x branch September 11, 2020 00:33
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

3 participants