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

Simplify specifying consumes #31223

Merged
merged 7 commits into from Aug 28, 2020
Merged

Conversation

Dr15Jones
Copy link
Contributor

PR description:

Made it possible to deduce the template parameters of the edm::EDGetTokenT and the edm::ESGetToken when specifying consumes.

PR validation:

The code compiles and all framework units pass.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31223/17882

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

FWCore/Framework
FWCore/Integration
FWCore/Utilities

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @wddgit 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

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 24, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-1

Tested at: 606f5f9

CMSSW: CMSSW_11_2_X_2020-08-24-1100
SCRAM_ARCH: slc7_amd64_gcc820

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-a8fa77/8898/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a8fa77/8898/git-merge-result

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a8fa77/8898/summary.html

I found follow errors while testing this PR

Failed tests: Build ClangBuild

  • Build:

I found compilation error when building:

/cvmfs/cms-ib.cern.ch/nweek-02643/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/include/c++/8.4.0/bits/stl_algobase.h:386:30:   required from '_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = edm::EDGetTokenT*; _OI = edm::EDGetTokenT*]'
/cvmfs/cms-ib.cern.ch/nweek-02643/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/include/c++/8.4.0/bits/stl_algobase.h:422:45:   required from '_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = edm::EDGetTokenT*; _OI = edm::EDGetTokenT*]'
/cvmfs/cms-ib.cern.ch/nweek-02643/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/include/c++/8.4.0/bits/stl_algobase.h:455:8:   required from '_OI std::copy(_II, _II, _OI) [with _II = edm::EDGetTokenT*; _OI = edm::EDGetTokenT*]'
/cvmfs/cms-ib.cern.ch/nweek-02643/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/include/c++/8.4.0/bits/vector.tcc:231:17:   required from 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = edm::EDGetTokenT; _Alloc = std::allocator >]'
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/JetMETCorrections/Type1MET/src/AddCorrectionsToGenericMET.cc:4:17:   required from here
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/FWCore/Utilities/interface/EDGetToken.h:83:45: error: 'class edm::EDGetTokenT' has no member named 'consumes'
       EDGetTokenT temp(iAdapter.template consumes());
                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
gmake: *** [tmp/slc7_amd64_gcc820/src/JetMETCorrections/Type1MET/src/JetMETCorrectionsType1MET/AddCorrectionsToGenericMET.cc.o] Error 1
>> Building  shared library tmp/slc7_amd64_gcc820/src/JetMETCorrections/Type1MET/src/JetMETCorrectionsType1MET/libJetMETCorrectionsType1MET.so
c++: error: tmp/slc7_amd64_gcc820/src/JetMETCorrections/Type1MET/src/JetMETCorrectionsType1MET/AddCorrectionsToGenericMET.cc.o: No such file or directory

  • Clang:

I found compilation error while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/Calibration/HcalCalibAlgos/plugins/HcalHBHEMuonAnalyzer.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/Calibration/HcalCalibAlgos/plugins/HcalHBHEMuonHighEtaAnalyzer.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/Calibration/HcalCalibAlgos/plugins/HcalIsoTrkAnalyzer.cc
In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/Calibration/HcalCalibAlgos/plugins/HOCalibAnalyzer.cc:30:
In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/FWCore/Framework/interface/EDAnalyzer.h:7:
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/FWCore/Framework/interface/EDConsumerBase.h:221:56: error: constexpr function's 1st parameter type 'edm::ESInputTag' is not a literal type
    [[nodiscard]] constexpr auto esConsumes(ESInputTag tag) noexcept {
                                            ~~~~~~~~~~~^~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-24-1100/src/FWCore/Utilities/interface/ESInputTag.h:87:9: note: 'ESInputTag' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors
  class ESInputTag {
        ^


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-a8fa77/8898/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a8fa77/8898/git-merge-result

@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors (RelVals and Igprof tests were also skipped)

@makortel
Copy link
Contributor

The JetMETCorrections/Type1MET/src/AddCorrectionsToGenericMET.cc:4 copies a vector<EDGetTokenT<CorrMETData>>

void AddCorrectionsToGenericMET::setCorTokens(std::vector<edm::EDGetTokenT<CorrMETData> > const& corrTokens) {
corrTokens_ = corrTokens;
}

Somehow the compiler picks the templated assignment-from-adapter instead of the copy assignment (or move assignment). Can that be caused by the latter two being declared noexcept?

@Dr15Jones
Copy link
Contributor Author

@makortel

Somehow the compiler picks the templated assignment-from-adapter instead of the copy assignment (or move assignment). Can that be caused by the latter two being declared noexcept?

I'm working on it now. My theory is the type is actually edm::EDGetTokenT<CorrMETData> >& which the compiler matches better with the templated operator= than with the actually copy-assignment operator. I saw this earlier with the copy constructor.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 27, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 31920eb
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a8fa77/8952/summary.html
CMSSW: CMSSW_11_2_X_2020-08-26-2300
SCRAM_ARCH: slc7_amd64_gcc820

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-a8fa77/8952/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a8fa77/8952/git-merge-result

@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-a8fa77/8952/summary.html

Comparison Summary:

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

@makortel
Copy link
Contributor

+1

@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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Aug 28, 2020

+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.

None yet

4 participants