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 clang compiler warning and replace boost::mpl::if_c with std::conditional #16821

Merged
merged 3 commits into from Dec 5, 2016

Conversation

knoepfel
Copy link
Contributor

Fixed some clang compiler warnings.
Also replaced several uses of boost::mpl::if_c with std::conditional.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @knoepfel (Kyle Knoepfel) for CMSSW_9_0_X.

It involves the following packages:

DataFormats/FWLite
FWCore/Framework
FWCore/ParameterSet
FWCore/Services
IOPool/Input
IOPool/Output
IOPool/Streamer

@cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @wddgit, @wmtan this is something you requested to watch as well.
@slava77, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@knoepfel
Copy link
Contributor Author

Sorry, looks like a lot of white-space-only changes in this request.

@Dr15Jones
Copy link
Contributor

please test

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 30, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/16688/console

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

-1

Tested at: 49a7908

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
03fb439
You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-16821/16688/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-16821/16688/git-merge-result

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

I found follow errors while testing this PR

Failed tests: Build

  • Build:

I found an error when building:

>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/CaloOnlineTools/EcalTools/plugins/EcalExclusiveTrigFilter.cc 
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/CaloOnlineTools/EcalTools/plugins/EcalPnGraphs.cc 
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/CaloOnlineTools/EcalTools/plugins/EcalMipGraphs.cc 
In file included from input_line_9:51:
In file included from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/DPGAnalysis/SiStripTools/interface/Multiplicities.h:6:
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/FWCore/Framework/interface/Event.h:373:10: error: no member named 'conditional_t' in namespace 'std'
    std::conditional_t::value,
    ~~~~~^
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/FWCore/Framework/interface/Event.h:384:10: error: no member named 'conditional_t' in namespace 'std'
    std::conditional_t::value,
    ~~~~~^


The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
03fb439
You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-16821/16688/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-16821/16688/git-merge-result

@cmsbuild
Copy link
Contributor

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

@knoepfel
Copy link
Contributor Author

What's going on here? The std::conditional_t typedef was introduced in C++14. To use it #include <type_traits> must be included. To my knowledge, the code was being compiled with the c++14 flag, and I have included the type-traits header.

@Dr15Jones
Copy link
Contributor

Looking at the full build log, I believe this is a rootcling problem. Clearing out the overlapping output caused by multiple processes used in the compilation leaves

>> Building LCG reflex dict from header file src/DPGAnalysis/SiStripTools/src/classes.h
In file included from input_line_9:51:
In file included from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/DPGAnalysis/SiStripTools/interface/Multiplicities.h:6:
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/FWCore/Framework/interface/Event.h:373:10: error: no member named 'conditional_t' in namespace 'std'
    std::conditional_t<detail::has_postinsert<PROD>::value,
    ~~~~~^
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/FWCore/Framework/interface/Event.h:384:10: error: no member named 'conditional_t' in namespace 'std'
    std::conditional_t<detail::has_donotrecordparents<PROD>::value,
    ~~~~~^
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2016-11-30-1100/src/FWCore/Framework/interface/Event.h:387:5: error: use of undeclared identifier 'parentage_recorder'
    parentage_recorder.do_it(putProducts(),
    ^
Error: rootcling: compilation failure (tmp/slc6_amd64_gcc530/src/DPGAnalysis/SiStripTools/src/DPGAnalysisSiStripTools/a/DPGAnalysisSiStripTools_xr73ad0eea2a_dictUmbrella.h)
gmake: *** [tmp/slc6_amd64_gcc530/src/DPGAnalysis/SiStripTools/src/DPGAnalysisSiStripTools/a/DPGAnalysisSiStripTools_xr.cc] Error 1

@smuzaffar do we have all the proper flags passed to cling?
@pcanal is this a known problem with ROOT 6.06?

@Dr15Jones
Copy link
Contributor

The head in question
http://cmslxr.fnal.gov/source/DPGAnalysis/SiStripTools/interface/Multiplicities.h

violates CMS policy that DataFormats should be seperate from the algorithm which produces them. Instead, the classes in this header attempt to create themselves (and therefore are trying to access edm::Event which no data product should do).

@Dr15Jones
Copy link
Contributor

The only file that actually uses Multiplicities.h is
http://cmslxr.fnal.gov/source/DPGAnalysis/SiStripTools/plugins/ByMultiplicityEventFilter.cc

and the classes in question are used as helpers and NOT as data formats. Therefore the Wrapper declarations are unnecessary.

However, that class does want dictionaries generated since it uses those classes with the StringCutObjectSelector so they can do simple comparisons from the configuration!

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/16751/console

@Dr15Jones
Copy link
Contributor

ROOT was rebuilt in the most recent IB to use C++14. This will be used in the next test.

@Dr15Jones
Copy link
Contributor

@smuzaffar looks like the ROOT change broke stuff but we missed it in the IB since we didn't do a full rebuild of CMSSW after the change.

@Dr15Jones
Copy link
Contributor

I took a look at the failing file, but can't see any reason for the missing class error since the file does include the header file which declares that class. In addition, no ROOT specific defines are in any of those headers.
Maybe it was a transient file reading glitch?

@smuzaffar
Copy link
Contributor

@Dr15Jones , CMSSW_9_0_X_2016-12-02-2300 was a full build with root updates.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2016

-1

Tested at: a17221c

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

I found follow errors while testing this PR

Failed tests: UnitTests

  • Unit Tests:

I found errors in the following unit tests:

---> test testRecoMETMETProducers had ERRORS

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2016

Comparison job queued.

@Dr15Jones
Copy link
Contributor

+1

@Dr15Jones
Copy link
Contributor

The unit test failure has nothing to do with this pull request. (The test failed because the file generated for the test could not be found, which probably means a race condition in the testing infrastructure.)

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2016

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-16821/16751/summary.html

The workflows 1003.0, 1001.0, 1000.0, 140.53, 136.731, 4.22 have different files in step1_dasquery.log than the ones found in the baseline. You may want to check and retrigger the tests if necessary. You can check it in the "files" directory in the results of the comparisons

@davidlange6
Copy link
Contributor

hi @knoepfel - could you edit the pull request title to be more reflective of changes made for the release notes. Thanks.

@knoepfel knoepfel changed the title General cleanup Fix clang compiler warning and replace boost::mpl::if_c with std::conditional Dec 5, 2016
@knoepfel
Copy link
Contributor Author

knoepfel commented Dec 5, 2016

@davidlange6 done.

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

6 participants