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 improper use of std::unique and std::remove #47320

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

iarspider
Copy link
Contributor

PR description:

In GCC14 builds, a warning is emitted when discarding output value of function marked nodiscard, such as std::unique and std::remove. Since both of these functions take iterators, they are not modifying the length of the original sequence (std::vector) - i.e. the removed elements are still accessible but their value is undefined. One must call erase(...) to update the number of elements.

The proposed changes cleanup most of the reported issues.

PR validation:

Bot tests

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 11, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • DQM/HLTEvF (dqm, hlt)
  • DQMOffline/RecoB (dqm)
  • PhysicsTools/PatAlgos (xpog, reconstruction)
  • RecoEcal/EgammaClusterProducers (reconstruction)
  • RecoEgamma/EgammaIsolationAlgos (reconstruction)
  • RecoLocalTracker/SiPixelClusterizer (reconstruction)

@Martin-Grunewald, @antoniovagnerini, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen, @mmusich, @rseidita can you please review it and eventually sign? Thanks.
@AlexDeMoor, @GiacomoSguazzoni, @Ming-Yan, @Prasant1993, @ReyerBand, @Sam-Harper, @Senphy, @VinInn, @VourMa, @a-kapoor, @afiqaize, @ahinzmann, @andrzejnovak, @argiro, @azotz, @castaned, @dkotlins, @felicepantaleo, @ferencek, @gkasieczka, @gouskos, @gpetruc, @hatakeyamak, @jainshilpi, @jdamgov, @jdolen, @lgray, @mariadalfonso, @mbluj, @missirol, @mmarionncern, @mmusich, @mroguljic, @mtosi, @nhanvtran, @ram1123, @rappoccio, @rchatter, @rociovilar, @rovere, @sameasy, @schoef, @seemasharmafnal, @sobhatta, @thomreis, @threus, @tsusa, @tvami, @valsdav, @varuns23, @wang0jin this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 64KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88d0de/44318/summary.html
COMMIT: 1f409e6
CMSSW: CMSSW_15_1_X_2025-02-11-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47320/44318/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 580 differences found in the comparisons
  • DQMHistoTests: Total files compared: 51
  • DQMHistoTests: Total histograms compared: 4133510
  • DQMHistoTests: Total failures: 2664
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4130826
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
  • Checked 222 log files, 194 edm output root files, 51 DQM output files
  • TriggerResults: no differences found

@iarspider
Copy link
Contributor Author

please test for el8_amd64_gcc14

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build HeaderConsistency
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88d0de/44326/summary.html
COMMIT: 1f409e6
CMSSW: CMSSW_15_1_X_2025-02-10-2300/el8_amd64_gcc14
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47320/44326/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88d0de/44326/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88d0de/44326/git-merge-result

Build

I found compilation error when building:

>> Leaving Package RecoTBCalo/HcalTBTools
>> Package RecoTBCalo/HcalTBTools built
Copying tmp/el8_amd64_gcc14/src/RecoVertex/PixelVertexFinding/plugins/RecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync/libRecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync_rocm.a to productstore area:
cp: cannot stat 'tmp/el8_amd64_gcc14/src/RecoVertex/PixelVertexFinding/plugins/RecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync/libRecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync_rocm.a': No such file or directory
>> Deleted: tmp/el8_amd64_gcc14/src/RecoVertex/PixelVertexFinding/plugins/RecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync/libRecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync_rocm.a
gmake: *** [config/SCRAM/GMake/Makefile.rules:1886: tmp/el8_amd64_gcc14/src/RecoVertex/PixelVertexFinding/plugins/RecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync/libRecoPixelVertexingPixelVertexFindingPluginsPortableROCmAsync_rocm.a] Error 1
>> Entering Package SimTransport/HectorProducer
>> Leaving Package SimTransport/HectorProducer
>> Package SimTransport/HectorProducer built
Entering library rule at SimTransport/HectorProducer
>> Compiling edm plugin src/SimTransport/HectorProducer/src/Hector.cc


@smuzaffar
Copy link
Contributor

please test

lets rerun the tests and this time bot should run the extra 12834.7 due to tracking label

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88d0de/44373/summary.html
COMMIT: 1f409e6
CMSSW: CMSSW_15_1_X_2025-02-12-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47320/44373/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@jfernan2
Copy link
Contributor

+1

@Martin-Grunewald
Copy link
Contributor

+1

@hqucms
Copy link
Contributor

hqucms commented Feb 17, 2025

+1

@antoniovagnerini
Copy link

+dqm

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

@mandrenguyen
Copy link
Contributor

+1

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.

8 participants