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

[GENERATORS] [DEVEL] Fix warnings on deprecated copy-constructors #43405

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

smuzaffar
Copy link
Contributor

Fixes deprecated warnings for DEVEL IBs

@smuzaffar
Copy link
Contributor Author

please test for CMSSW_14_0_DEVEL_X

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43405/37907

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 27, 2023

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

  • SimDataFormats/GeneratorProducts (generators)

@bbilin, @alberto-sanchez, @GurpreetSinghChahal, @mkirsano, @SiewYan, @menglu21 can you please review it and eventually sign? Thanks.
@fabiocos, @bsunanda, @apsallid, @youyingli, @missirol, @rovere this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals AddOn
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-57fc96/36094/summary.html
COMMIT: 924ab10
CMSSW: CMSSW_14_0_DEVEL_X_2023-11-26-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/43405/36094/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

----- Begin Fatal Exception 27-Nov-2023 18:54:59 CET-----------------------
An exception of category 'FileReadError' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 1 stream: 0
   [1] Running path 'Flag_hcalLaserEventFilter'
   [2] Prefetching for module HcalLaserEventFilter/'hcalLaserEventFilter'
   [3] While reading from source HcalNoiseSummary hcalnoise '' RECO
   [4] Rethrowing an exception that happened on a different read request.
   [5] Processing  Event run: 1 lumi: 1 event: 1 stream: 0
   [6] Running path 'validation_step'
   [7] Prefetching for module JetTester/'JetAnalyzerAk8PFPUPPIMiniAOD'
   [8] While reading from source GenEventInfoProduct generator '' SIM
   [9] Reading branch GenEventInfoProduct_generator__SIM.
   Additional Info:
      [a] Fatal Root Error: @SUB=TClass::BuildRealData
Inspection for auto_ptr<gen::PdfInfo> not supported!

----- End Fatal Exception -------------------------------------------------

AddOn Tests

----- Begin Fatal Exception 27-Nov-2023 18:47:47 CET-----------------------
An exception of category 'FileReadError' occurred while
   [0] Processing  Event run: 1 lumi: 1 event: 2 stream: 0
   [1] Running path 'p'
   [2] Prefetching for module CandidateSummaryTable/'selectedPatCandidateSummary'
   [3] Prefetching for module PATJetSelector/'selectedPatJets'
   [4] Prefetching for module PATJetProducer/'patJets'
   [5] While reading from source edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,std::vector<edm::RefVector<std::vector<reco::Track>,reco::Track,edm::refhelper::FindUsingAdvance<std::vector<reco::Track>,reco::Track> > >,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference> ak4JetTracksAssociatorAtVertexPF '' RECO
   [6] Rethrowing an exception that happened on a different read request.
   [7] Processing  Event run: 1 lumi: 1 event: 2 stream: 0
   [8] Running path 'p'
   [9] Prefetching for module CandidateSummaryTable/'selectedPatCandidateSummary'
   [10] Prefetching for module PATJetSelector/'selectedPatJets'
   [11] Prefetching for module PATJetProducer/'patJets'
   [12] Prefetching for module JetFlavourClustering/'patJetFlavourAssociation'
   [13] Prefetching for module HadronAndPartonSelector/'patJetPartons'
   [14] While reading from source GenEventInfoProduct generator '' SIM
   [15] Reading branch GenEventInfoProduct_generator__SIM.
   Additional Info:
      [a] Fatal Root Error: @SUB=TClass::BuildRealData
Inspection for auto_ptr<gen::PdfInfo> not supported!

----- End Fatal Exception -------------------------------------------------

@smuzaffar
Copy link
Contributor Author

@makortel @Dr15Jones , any idea how to fix this. If we keep <class name="std::auto_ptr&lt;gen::PdfInfo&gt;"/> then we get warnings like [a] ('std::auto_ptr' is deprecated) and replacing it with std::unique_ptr rootcling fails with error

Error: It is not necessary to explicitly select class unique_ptr<gen::PdfInfo,default_delete<gen::PdfInfo> >. I/O is supported for it transparently.

and removing it causese runtime errors like

Inspection for auto_ptr<gen::PdfInfo> not supported!

any idea ?

[a]

SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc: At global scope:
  SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc:234:62: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
   234 |    static TGenericClassInfo *GenerateInitInstanceLocal(const auto_ptr<gen::PdfInfo>*)
      |                                                              ^~~~~~~~
In file included from /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/memory:75,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/lcg/root/6.26.11-1ef575234f3b954353280f3578660947/include/ROOT/TypeTraits.hxx:15,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/lcg/root/6.26.11-1ef575234f3b954353280f3578660947/include/TString.h:30,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/lcg/root/6.26.11-1ef575234f3b954353280f3578660947/include/TNamed.h:26,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/lcg/root/6.26.11-1ef575234f3b954353280f3578660947/include/TDictionary.h:44,
                 from /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/lcg/root/6.26.11-1ef575234f3b954353280f3578660947/include/TClass.h:23,
                 from SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc:14:
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;

@Dr15Jones
Copy link
Contributor

The reason we have a dictionary generation for auto_ptr<gen::PdfInfo> is the class GenEventInfoProduct used to use an auto_ptr but 5 years ago we changed it to use a unique_ptr so the dictionary for auto_ptr is only needed for the IO rule that allows us to read old files. The change to unique_ptr was done in CMSSW_11_0_0.

@makortel
Copy link
Contributor

@smuzaffar Discussing with @Dr15Jones about what to do here, we think dealing with the use of auto_ptr in the ROOT dictionaries needs a bit more discussion, so I'll open a separate issue to discuss what exactly to do with that. I'd suggest to undo the changes in classes_def.xml in this PR, and continue with the rest.

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

Pull request #43405 was updated. @SiewYan, @mkirsano, @GurpreetSinghChahal, @bbilin, @alberto-sanchez, @menglu21 can you please check and sign again.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-57fc96/36127/summary.html
COMMIT: 802b299
CMSSW: CMSSW_14_0_X_2023-11-28-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/43405/36127/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@smuzaffar
Copy link
Contributor Author

please test

@smuzaffar
Copy link
Contributor Author

@cms-sw/generators-l2 can you please review this change?

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-57fc96/36289/summary.html
COMMIT: 802b299
CMSSW: CMSSW_14_0_X_2023-12-03-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43405/36289/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 61 lines to the logs
  • Reco comparison results: 9 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3370032
  • DQMHistoTests: Total failures: 78
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3369932
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 214 log files, 167 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@smuzaffar
Copy link
Contributor Author

@bbilin, @alberto-sanchez, @GurpreetSinghChahal, @mkirsano, @SiewYan, @menglu21 can you please review this. This is just atechnical change to fix the deprecated copy constructor warnings

@smuzaffar smuzaffar changed the title [GENERATORS] [DEVEL] Fix warnings on deprecated copy-constructors @smuzaffar [GENERATORS] [DEVEL] Fix warnings on deprecated copy-constructors Dec 6, 2023
@smuzaffar
Copy link
Contributor Author

please test for CMSSW_14_0_DEVEL_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 6, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-57fc96/36344/summary.html
COMMIT: 802b299
CMSSW: CMSSW_14_0_DEVEL_X_2023-12-05-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43405/36344/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@smuzaffar
Copy link
Contributor Author

@bbilin, @alberto-sanchez, @GurpreetSinghChahal, @mkirsano, @SiewYan, @menglu21 any generator L2 around to review this PR?

@smuzaffar
Copy link
Contributor Author

@cms-sw/generators-l2 can you please review this. This is needed to fix the most of the build warnings for DEVEL IBs

@smuzaffar
Copy link
Contributor Author

@cms-sw/orp-l2 , looks like non of @cms-sw/generators-l2 are around for last 2 weeks. This fixes the deprecated warnings issue by removing the unnecessary copy construction/operator. Can we merge this for 14.0.X

@antoniovilela
Copy link
Contributor

@cms-sw/orp-l2 , looks like non of @cms-sw/generators-l2 are around for last 2 weeks. This fixes the deprecated warnings issue by removing the unnecessary copy construction/operator. Can we merge this for 14.0.X

Thanks. Yes.

@antoniovilela
Copy link
Contributor

+1

@antoniovilela
Copy link
Contributor

merge

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