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
Use unique_ptr, not auto_ptr, in Generators #14169
Use unique_ptr, not auto_ptr, in Generators #14169
Conversation
A new Pull Request was created by @wmtan for CMSSW_8_1_X. It involves the following packages: GeneratorInterface/AlpgenInterface @cmsbuild, @covarell, @govoni, @thuer, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison not run due to Build errors (RelVals and Igprof tests were also skipped) |
-1 Tested at: fffefc6 You can see the results of the tests here: I found follow errors while testing this PR Failed tests: Build ClangBuild
I found an error when building: >> Compiling /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/ReggeGribovPartonMCInterface/src/sibyll_21.f In file included from /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/interface/GenFilterEfficiencyProducer.h:20:0, from /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc:1: /cvmfs/cms-ib.cern.ch/week1/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_8_1_X_2016-04-20-1100/src/FWCore/Framework/interface/LuminosityBlock.h: In instantiation of 'void edm::LuminosityBlock::put(std::unique_ptr<_Tp>) [with PROD = GenFilterInfo]': /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc:132:35: required from here /cvmfs/cms-ib.cern.ch/week1/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_8_1_X_2016-04-20-1100/src/FWCore/Framework/interface/LuminosityBlock.h:113:50: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = GenFilterInfo; _Dp = std::default_delete]' put(std::unique_ptr product) {put(product, std::string());} ^ In file included from /cvmfs/cms-ib.cern.ch/2016-17/slc6_amd64_gcc530/external/gcc/5.3.0/include/c++/5.3.0/memory:81:0, from /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/interface/GenFilterEfficiencyProducer.h:11, from /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc:1:
I found a compilation error while trying to compile with clang: >> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/GenFilters/src/XtoFFbarFilter.cc >> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/GenFilters/src/NJetsMC.cc >> Compiling edm plugin /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/GenFilters/src/LQGenFilter.cc In file included from /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc:1: In file included from /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/interface/GenFilterEfficiencyProducer.h:20: /cvmfs/cms-ib.cern.ch/week1/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_8_1_X_2016-04-20-1100/src/FWCore/Framework/interface/LuminosityBlock.h:113:51: error: call to deleted constructor of 'std::unique_ptr' put(std::unique_ptr product) {put(product, std::string());} ^~~~~~~ /build/cmsbuild/jenkins-workarea/workspace/ib-any-integration/CMSSW_8_1_X_2016-04-20-1100/src/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc:132:9: note: in instantiation of function template specialization 'edm::LuminosityBlock::put' requested here iLumi.put(std::move(thisProduct)); ^ |
fffefc6
to
bde3aa4
Compare
Pull request #14169 was updated. @smuzaffar, @Dr15Jones, @thuer, @cmsbuild, @covarell, @govoni, @davidlange6 can you please check and sign again. |
@cmsbuild please test |
-1 Tested at: bde3aa4 You can see the results of the tests here: I found follow errors while testing this PR Failed tests: RelVals AddOn
When I ran the RelVals I found an error in the following worklfows: runTheMatrix-results/9.0_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST/step1_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST.log
I found errors in the following addon tests: cmsDriver.py TTbar_Tauola_13TeV_cfi -s GEN,SIM,DIGI,L1,DIGI2RAW --mc --scenario=pp -n 10 --conditions auto:run2_mc_GRun --relval 9000,50 --datatier "GEN-SIM-RAW" --eventcontent RAWSIM --customise=HLTrigger/Configuration/CustomConfigs.L1T --era Run2_2016 --magField 38T_PostLS1 --fileout file:RelVal_Raw_GRun_MC.root : FAILED - time: date Thu Apr 21 06:41:49 2016-date Thu Apr 21 06:38:21 2016 s - exit: 35584 |
Closed temporarily while I investigate the test errors. |
-1 Tested at: bde3aa4 You can see the results of the tests here: I found follow errors while testing this PR Failed tests: RelVals AddOn
When I ran the RelVals I found an error in the following worklfows: runTheMatrix-results/9.0_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST/step1_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST.log
I found errors in the following addon tests: cmsDriver.py TTbar_Tauola_13TeV_cfi -s GEN,SIM,DIGI,L1,DIGI2RAW --mc --scenario=pp -n 10 --conditions auto:run2_mc_GRun --relval 9000,50 --datatier "GEN-SIM-RAW" --eventcontent RAWSIM --customise=HLTrigger/Configuration/CustomConfigs.L1T --era Run2_2016 --magField 38T_PostLS1 --fileout file:RelVal_Raw_GRun_MC.root : FAILED - time: date Thu Apr 21 07:14:12 2016-date Thu Apr 21 07:10:43 2016 s - exit: 35584 |
bde3aa4
to
0fb96b8
Compare
The problem causing the test failures was found and fixed. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
|
@wmtan @Dr15Jones this PR most likely broke all of the gen workflows -could you have a look? eg |
David, (and Chris),
Bill On 4/28/16 7:15 AM, David Lange wrote:
|
@wmtan don't worry, I've been looking into it this morning. |
The crash happens in this line 433 leadTrackpt->Fill(hepmcGPCollection[iMax]->momentum().perp(),weight); where |
Chris, Bill On 4/28/16 10:13 AM, Chris Jones wrote:
|
#14293 fixes at least some of the problem if not all |
@Dr15Jones You are correct that reset is the problem, and that unique_ptr.reset() does not have a check for the same pointer as the old one. However, I do not yet fully understand why unique_ptr::reset() gives an incorrect result in this case. I don't know if this is a general problem or a problem specific to certain classes, such as HepMC::GenEvent. The problem may (or may not) be that HepMC::GenEvent is not correctly movable. Indeed, HepMC::GenEvent was written in 1999, well before C++11, and has no support for moving. It is 3rd party code. |
The last use of the deprecated std::auto_ptr in the CMS framework is the "put" interface for EDProducts, which also supports std::unique:ptr. This PR changes all put calls in generators to use std::unique_ptr instead of std::auto_ptr. Some other instances of std::auto_ptr in generators may also have been changed to std::unique_ptr.