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

Move EventSetup module PSet validation to be called from ComponentMaker #39556

Merged
merged 4 commits into from
Oct 9, 2022

Conversation

makortel
Copy link
Contributor

PR description:

The #39391 missed the detail that in the EventSetup the PSet validation is done via a separate plugin factory.

This PR attempts to address that deficiency by moving the PSet validation to be called from the ComponentMaker, just before the ES module is constructed. A benefit of this approach is that it makes the EventSetup side a little bit more consistent with the Event side. A downside is that more code gets mutable access to the PSet (there could be more I didn't think of).

An alternative would be to extend the module type resolving logic in some way to edm::eventsetup::validateEventSetupParameters(). In a later PR I'll change the

auto resolveMaker(std::string const& moduleType, ModuleTypeResolverBase const* resolver) {

to handle the insertion of the found maker into the caches in Factory/ComponentFactory (in order to cache based on the resolved module type rather than the requested module type), and while handling this non-cached plugin can be added there with some complexity, I felt the approach of this PR to be simpler in the bigger picture.

PR validation:

Framework unit tests pass.

Copy link
Contributor Author

@makortel makortel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dr15Jones @wddgit What do you think?

FWCore/Framework/src/EventSetupsController.cc Outdated Show resolved Hide resolved
@@ -78,12 +78,13 @@ namespace edm {

// ---------- member functions ---------------------------

protected:
static const std::string kEmpty;
static const std::string kBaseForService;
static const std::string kBaseForESSource;
static const std::string kBaseForESProducer;
static const std::string kBaseForEDLooper;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is a better way than making these public? Although maybe it isn't too bad either?

(in the Event system the EDModule base classes define the corresponding strings)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use constexpr std::string_view for this to avoid allocation when the shared library is loaded? [Although many implementations of std::string have a small string optimization]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds plausible, but I'd leave that to a subsequent PR because of being somewhat orthogonal.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39556/32345

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel (Matti Kortelainen) for master.

It involves the following packages:

  • FWCore/Framework (core)
  • FWCore/ParameterSet (core)

@cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please review it and eventually sign? Thanks.
@missirol, @wddgit this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@wddgit
Copy link
Contributor

wddgit commented Sep 30, 2022

I took a quick look. It all looks reasonable to me.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 1, 2022

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-db8483/27888/summary.html
COMMIT: b17d5d8
CMSSW: CMSSW_12_6_X_2022-09-30-1100/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/39556/27888/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found errors in the following unit tests:

---> test createDBObjecs had ERRORS
---> test GeometryTrackerGeometryBuilderTestDriver had ERRORS
---> test testPhase2SkimmedGeometry had ERRORS
---> test testPhase2PixelNtuple had ERRORS
and more ...

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-db8483/41834.0_TTbar_14TeV+2026D94+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 9 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3432650
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3432619
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 49 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@Dr15Jones
Copy link
Contributor

done with comments

This change is motivated by ModuleTypeResolver functionality, which,
on the EventSetup side, currently misses the PSet validation plugin
factory. On the Event side the PSet validation is done as part of the
module maker, and this particular change makes the module creation on
EventSetup and Event sides a little bit more consistent.
@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2022

Pull request #39556 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please check and sign again.

@makortel
Copy link
Contributor Author

makortel commented Oct 4, 2022

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2022

-1

Failed Tests: UnitTests RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-db8483/27962/summary.html
COMMIT: 7a302e0
CMSSW: CMSSW_12_6_X_2022-10-03-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/39556/27962/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found errors in the following unit tests:

---> test createDBObjecs had ERRORS
---> test materialBudgetHGCalPlots had ERRORS

RelVals-INPUT

The relvals timed out after 4 hours.

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-db8483/41834.0_TTbar_14TeV+2026D94+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3432650
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3432625
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 49 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor Author

makortel commented Oct 5, 2022

@cmsbuild, please test

@aandvalenzuela
Copy link
Contributor

please test

  • Tests need to be restarted due to an issue with singularity when publishing to cvmfs. Sorry for the inconvenience!

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-db8483/28076/summary.html
COMMIT: 7a302e0
CMSSW: CMSSW_12_6_X_2022-10-05-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/39556/28076/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-db8483/41834.0_TTbar_14TeV+2026D94+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3391103
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3391078
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 204 log files, 49 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor Author

makortel commented Oct 7, 2022

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 7, 2022

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

@perrotta
Copy link
Contributor

perrotta commented Oct 9, 2022

+1

@cmsbuild cmsbuild merged commit 2a0f9ce into cms-sw:master Oct 9, 2022
@makortel makortel deleted the psetValidationComponentMaker branch October 10, 2022 14:54
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.

6 participants