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

[12_4_X] Preprocess EDAlias and SwitchProducer information for ConditionalTask #38731

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

makortel
Copy link
Contributor

PR description:

Backport of #38730. Quoting the description of the original PR

Profiling #38725 in https://mkortela.web.cern.ch/mkortela/cgi-bin/navigator/issue38725/hlt_ConditionalTask_06_perf/12 showed that a lot of time in an HLT job was spent in edm::ParameterSet::getParameter<edm::ParameterSet>() and edm::detail::processEDAliases(). These seemed to be caused by the processing of EDAliases and SwitchProducers for ConditionalTasks being repeated for all the Paths of the HLT menu (e.g. the SwitchProducer loop has N(paths) x N(modules) overall complexity).

This PR attempts to speed up the job startup time by processing the EDAliases and SwitchProducers for ConditionalTasks only once for all Paths, leading to > 10x improvement in the StreamSchedule constructor
https://mkortela.web.cern.ch/mkortela/cgi-bin/navigator/issue38725/hlt_ConditionalTask_36_perf/12
bringing the time close to what it would be if the HLT menu would use Tasks instead of ConditionalTasks
https://mkortela.web.cern.ch/mkortela/cgi-bin/navigator/issue38725/hlt_Task_06_perf/12

PR validation:

Framework unit tests pass.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

Backport of #38730 to 12_4_X.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 13, 2022

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

It involves the following packages:

  • FWCore/Framework (core)

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

cms-bot commands are listed here

@fwyzard
Copy link
Contributor

fwyzard commented Jul 13, 2022

backport #38730

@fwyzard
Copy link
Contributor

fwyzard commented Jul 13, 2022

type bugfix

@fwyzard
Copy link
Contributor

fwyzard commented Jul 13, 2022

urgent

This PR is needed before HLT can switch to CMSSW_12_4_X.

@fwyzard
Copy link
Contributor

fwyzard commented Jul 13, 2022

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c27023/26220/summary.html
COMMIT: dc7837b
CMSSW: CMSSW_12_4_X_2022-07-13-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/38731/26220/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: 50
  • DQMHistoTests: Total histograms compared: 3676111
  • DQMHistoTests: Total failures: 13
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3676075
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 49 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor Author

This PR is needed before HLT can switch to CMSSW_12_4_X.

In light of this requirement how soon does this PR need to be signed/merged? @qliphy @perrotta While @Dr15Jones left some comments in the master PR, I could address those in a later PR if the bigger picture needs this PR in ASAP.

@makortel
Copy link
Contributor Author

Ok, after starting to take a look of the refinements, I'd like to spend some time with them, so it's probably best to proceed with this (and the master PR) as is.

@makortel
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_12_4_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_12_5_X is complete. This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

  • Succesfully merged in CMSSW_12_5_X_2022-07-15-1100

@cmsbuild cmsbuild merged commit 748c6de into cms-sw:CMSSW_12_4_X Jul 15, 2022
@makortel makortel deleted the perfConditionalTask_12_4_x branch July 15, 2022 19:34
@perrotta
Copy link
Contributor

@makortel @fwyzard @Dr15Jones in the last CMSSW_12_4_X_2022-07-15-2300 IB, after the merge of this PR. we see a unit test error for FWCore/Integration/test/EDAlias_t.cpp, see e.g.https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc10/CMSSW_12_4_X_2022-07-15-2300/unitTestLogs/FWCore/Integration#/

The IBs in the master do not report that error. Is there anything forgotten about this backport?
We would like to upload the 12_4_3 release built from that CMSSW_12_4_X_2022-07-15-2300: do you think that such an error is somehow relevant, and worth a fix?

@perrotta perrotta mentioned this pull request Jul 16, 2022
@fwyzard
Copy link
Contributor

fwyzard commented Jul 16, 2022

@perrotta
Copy link
Contributor

I see. And it disappears in the following IB
Puzzled... but probably harmless...
Let keep an eye on it

@fwyzard
Copy link
Contributor

fwyzard commented Jul 16, 2022

Looking into the code, I think the ProductNotFound messages are expected:

{
edm::test::TestProcessor::Config config{fmt::format(baseConfig, "'intalias:foo'")};
edm::test::TestProcessor tester(config);
REQUIRE_THROWS_WITH(tester.test(), Catch::Contains("ProductNotFound"));
}
{
edm::test::TestProcessor::Config config{fmt::format(baseConfig, "'intalias'")};
edm::test::TestProcessor tester(config);
REQUIRE_THROWS_WITH(tester.test(), Catch::Contains("ProductNotFound"));
}

In fact, the unit test does pass for me when I run it locally:

/cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_0_pre2$ ./test/el8_amd64_gcc10/EDAlias_t 
----- Begin Fatal Exception 16-Jul-2022 09:10:02 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
[...]
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 16-Jul-2022 09:10:02 CEST-----------------------
An exception of category 'ProductNotFound' occurred while
[...]
----- End Fatal Exception -------------------------------------------------
===============================================================================
All tests passed (30 assertions in 7 test cases)

@fwyzard
Copy link
Contributor

fwyzard commented Jul 16, 2022

Wait, going through the logs, the failure is actually from TestSubProcess: https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc10/CMSSW_12_4_X_2022-07-15-2300/unitTestLogs/FWCore/Integration#/11701-11724 .

@perrotta
Copy link
Contributor

Wait, going through the logs, the failure is actually from TestSubProcess: https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc10/CMSSW_12_4_X_2022-07-15-2300/unitTestLogs/FWCore/Integration#/11701-11724 .

Ok, that should have been fixed by #38756
Now there is a "24" vs "25" in the log: it is non clear to me what those numbers exactly correspond to and why they are different in the logs compared by the unit test, but according to the discussions preceeding #38756 it is not something we should worry about.

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.

4 participants