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 a stream to skip a lumi if all events processed #43522

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Dec 7, 2023

PR description:

This PR will make the Framework try to direct a stream to skip a lumi if all events have been processed by other streams and the stream has not started the luminosity block yet.

Note that a stream might have started a lumi but not gotten any events yet and then it is too late to skip the lumi. Even after this PR is merged, it will still be possible for a stream to just run begin stream lumi and end stream lumi with no events.

This new behavior will be a performance improvement when one event takes a very long time to process. Before this PR, the stream processing that event cannot process any subsequent lumis and those lumis cannot complete until after the event completes. If the limit on the number of lumis is reached, all other work might become stuck until the slow event completes.

PR validation:

All pre-existing unit Core unit tests pass.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 7, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43522/38104

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 7, 2023

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

It involves the following packages:

  • FWCore/Framework (core)

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

cms-bot commands are listed here

@wddgit
Copy link
Contributor Author

wddgit commented Dec 7, 2023

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 7, 2023

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ef83f9/36373/summary.html
COMMIT: 6c17d4e
CMSSW: CMSSW_14_0_X_2023-12-07-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43522/36373/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 2 errors in the following unit tests:

---> test TestFWCoreFrameworkTransitions had ERRORS
---> test TestFWCoreFrameworkGlobalStreamOne had ERRORS

Comparison Summary

Summary:

@wddgit
Copy link
Contributor Author

wddgit commented Dec 7, 2023

The two unit test failures are the ones I expected. I need to update the unit tests. I'll continue with this next week and add some new tests if I'm heading in the right direction on this...

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43522/38165

@cmsbuild
Copy link
Contributor

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

@wddgit
Copy link
Contributor Author

wddgit commented Dec 12, 2023

please test

Just pushed a commit to fix unit test TestFWCoreFrameworkTransitions. Now it passes with this PR. Sometimes that test has a stream that skips a lumi. It does not happen always (seems like very roughly half the time).The test criteria were modified to allow the test to pass if a stream lumi begin or end transition is skipped. It also checks that the expected number of transitions equals the seen number of transitions plus the number skipped, that skipped stream lumi transitions come in matched pairs (a begin and end for the same stream and lumi), and that there is at least one stream begin lumi for every global begin lumi transition.

(There's still one more failing. Working on that next.)

@wddgit
Copy link
Contributor Author

wddgit commented Mar 13, 2024

I just force pushed. The code should be exactly the same. I squashed and rebased. The history will be a little cleaner.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43522/39460

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

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

@wddgit
Copy link
Contributor Author

wddgit commented Mar 13, 2024

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ef83f9/38109/summary.html
COMMIT: f89e621
CMSSW: CMSSW_14_1_X_2024-03-13-1100/el8_amd64_gcc12
Additional Tests: THREADING
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43522/38109/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 103 lines to the logs
  • Reco comparison results: 53 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3297383
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3297354
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@makortel
Copy link
Contributor

+core

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

@makortel
Copy link
Contributor

I'd suggest to not merge this PR on Friday because of slight risk of breaking something. Merging today or Sunday/Monday would be preferred.

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 8404f1a into cms-sw:master Mar 14, 2024
13 checks passed
@makortel makortel mentioned this pull request Mar 25, 2024
@wddgit wddgit deleted the allowStreamsToSkipLumis branch October 28, 2024 15:29
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.

5 participants