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

Allow SwitchProducer cases to declare different transient products #40104

Merged
merged 2 commits into from Nov 25, 2022

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Nov 17, 2022

PR description:

Allow SwitchProducer cases to declare different transient products. Currently we throw an exception if all cases do not declare the same produced products. With this, we allow differences for products marked as transient in their dictionary.

PR validation:

Extends an existing unit test to verify differences in declared transient products do not cause an exception to be thrown.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40104/33088

  • This PR adds an extra 52KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wddgit (W. David Dagenhart) for master.

It involves the following packages:

  • FWCore/Framework (core)
  • FWCore/Integration (core)

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

@wddgit
Copy link
Contributor Author

wddgit commented Nov 17, 2022

@makortel We were discussing adding a separate check that would still throw an exception if a process was configured to get one of the transient products that is now allowed by this pull request. So it would still be OK for the producer to declare it produces them, only getting one of them would cause the exception.

There was some discussion whether this extra check was worth the effort to implement. I think in the end we were leaning toward not implementing this extra code.

The original idea was to not declare the SwitchProducer produces such products. The problem with that implementation is that when the SwitchProducer constructor is executed we do not know which products are produced by all cases. So this would be difficult (not impossible).

A second idea was to not create the switch alias to such cases. But it seems to me that has the same problem.

These two implementations seem difficult and not worth the effort. Plus they complicate the existing code. Given that in the long run we'd like to move on from SwitchProducer altogether, my recommendation would be to not implement this.

I'll add one more comment. One other idea I had. It seems less of a hack and less difficult than the other options we discussed earlier. We could add an addition bool data member to the BranchDescription in the Transient data member. It could flag products which should not be gotten. Then the SwitchProducer ProductResolvers could check that and throw an exception if those products were retrieved from the event. If you think this idea is worth pursuing, or one of the other possible implementations, then let me know and I'll extend this PR to add that. Otherwise, I'll just leave it as is, we can be done with this and I'll start working on something else.

@wddgit
Copy link
Contributor Author

wddgit commented Nov 17, 2022

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d10030/29089/summary.html
COMMIT: 8de4a67
CMSSW: CMSSW_12_6_X_2022-11-17-1100/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40104/29089/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

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

edm::test::TestProcessor testProcessor1{config1};

edm::test::TestProcessor::Config config2{baseConfig2};
edm::test::TestProcessor testProcessor2{config2};
Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding here tester.test() call and checks for the product values? The necessary code gets exercised (for now) via TestProcessor constructor, but I think it would be good to ensure that the processor itself runs and gives correct values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. A good suggestion. Thanks.

@makortel
Copy link
Contributor

These two implementations seem difficult and not worth the effort. Plus they complicate the existing code. Given that in the long run we'd like to move on from SwitchProducer altogether, my recommendation would be to not implement this.

Let's proceed with this way then. (for now, at least)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40104/33097

  • This PR adds an extra 24KB to repository

@wddgit
Copy link
Contributor Author

wddgit commented Nov 18, 2022

please test

@cmsbuild
Copy link
Contributor

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

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d10030/29125/summary.html
COMMIT: ef53993
CMSSW: CMSSW_12_6_X_2022-11-18-1100/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40104/29125/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

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

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

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 4791225 into cms-sw:master Nov 25, 2022
@wddgit wddgit deleted the switchAllowTransientDifferences branch January 13, 2023 17:34
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