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

Improve PluginDescription with VPSets #35477

Merged
merged 2 commits into from Oct 1, 2021
Merged

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Sep 29, 2021

PR description:

This allows the ParameterSetDescriptions to be different for each element of a VPSet in the special case where the elements hold a PluginDescription. Previously all elements would need to have the same plugin type.

PR validation:

Extended an existing unit test to cover this case. It seems to only really be different in the ParameterSetDescription part of things in a minor way.

This allows the ParameterSetDescription to
be different for each element of a VPSet
in the special case where the elements
hold a PluginDescription.
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35477/25640

  • This PR adds an extra 44KB 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/Integration (core)
  • FWCore/ParameterSet (core)

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

cms-bot commands are listed here

@wddgit
Copy link
Contributor Author

wddgit commented Sep 29, 2021

please test

@@ -124,7 +124,7 @@ namespace edm {

void validate_(ParameterSet& pset, std::set<std::string>& validatedLabels, bool optional) const final {
loadPlugin(findType(pset));
cache_->validate(pset);
parameterSetDescription_->validate(pset);
Copy link
Contributor

Choose a reason for hiding this comment

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

The parameterSetDescription_ appears to be used only right after loadPlugin(). How about loadPlugin() would return the ParameterSetDescription object for which the validate() (and writeCfi() below) are called?

Or is there some other need to keep the object alive longer?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with Matti.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree also. That is even better. I made the change and am running the unit tests. I will push it as soon as they complete. Thanks.

@makortel
Copy link
Contributor

@Dr15Jones Do you have any concerns?

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8c4756/19256/summary.html
COMMIT: 10fedd8
CMSSW: CMSSW_12_1_X_2021-09-29-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/35477/19256/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: 10 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 3211080
  • DQMHistoTests: Total failures: 14
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3211043
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 39 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 169 log files, 37 edm output root files, 40 DQM output files
  • TriggerResults: no differences found

@Dr15Jones
Copy link
Contributor

Thinking a bit more, what if we took a different tack. Keep the cache_ but add a std::string cacheName_. In the load, compare the passed in name to cacheName_ and if they match return. If they do not match, update the cache_ and reset the cacheName_ to the new name. In that way, we basically keep the preformance benefits of the cache (if the same type is used repreatedly) but properly handle multiple types.

@wddgit
Copy link
Contributor Author

wddgit commented Sep 30, 2021

@Dr15Jones We could do that, but this cache isn't helping much anyway. If I am remembering how this works, we create a description run the validation for one module label and the description gets deleted. It doesn't help in cases where a VPSet isn't used, because it is only used once. Even with a VPSet it would only help if there were consecutive elements of the same plugin type. The current issue is the first case where VPSet is used at all and Matti said they are only going to put one or two elements in the VPSet and it sounds like the types are different... Maybe this is premature or even unnecessary optimization... I only see 4 cases where the PluginDescription is used at all (hopefully that will change, I think there are significantly more cases where it would be useful...) I don't feel strongly. What you suggest will work and if you and Matti agree I will put it in. At worst it slightly complicates the code in PluginDescription. Is there some use case where this optimization will make a significant performance difference?

@Dr15Jones
Copy link
Contributor

I have no problem dropping the cache_ until a time that we see it as a performance need.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35477/25660

  • This PR adds an extra 44KB to repository

@wddgit
Copy link
Contributor Author

wddgit commented Sep 30, 2021

please test

@cmsbuild
Copy link
Contributor

Pull request #35477 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-8c4756/19293/summary.html
COMMIT: 85bc95c
CMSSW: CMSSW_12_1_X_2021-09-30-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/35477/19293/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: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 3211080
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211052
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 39 files compared)
  • Checked 169 log files, 37 edm output root files, 40 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, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

perrotta commented Oct 1, 2021

+1

@cmsbuild cmsbuild merged commit 44523e5 into cms-sw:master Oct 1, 2021
@wddgit wddgit deleted the pluginDescVPSets branch May 2, 2022 14:48
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

5 participants