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

Fixed exceptional case handling in SherpaHadronizer #35204

Merged
merged 2 commits into from Sep 9, 2021

Conversation

Dr15Jones
Copy link
Contributor

@Dr15Jones Dr15Jones commented Sep 8, 2021

PR description:

The MPI::Init function setups up a unix signal handler which interferes with the signal handled used in the cmsExternalGenerator program. Moving the call to the constructor allows the signal handler to be reset
before doing any data processing.

Even with this change, an unix signal happening in the constructor will cause a dealock of the ExternalGenerator system.

Also had to avoid a case where an exception could be thrown while we were unrolling from another exception. That would happen if doSetRandomEngine would throw an exception.

PR validation:

The code compiles and a simple job using the SherpaHadronizer with the ExternalGeneratorFilter ran fine.
Explicitly adding an exception to Sherpa allowed us to test the problem.

The function setups up a unix signal handler which interferes with
the signal handled used in the cmsExternalGenerator program. Moving
the call to the constructor allows the signal handler to be reset
before doing any data processing.
Even with this change, an unix signal happening in the constructor
will cause a dealock of the ExternalGenerator system.
@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 8, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35204/25144

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 8, 2021

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

  • GeneratorInterface/SherpaInterface (generators)

@SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please review it and eventually sign? Thanks.
@alberto-sanchez, @mkirsano, @thuer 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

@Dr15Jones
Copy link
Contributor Author

please test

SherpaHadronizer::doSetRandomEngine is called by the destructor
so throwing an exception from there can happen when we are already
dealing with an exception which leads to std::termiate.
@Dr15Jones Dr15Jones changed the title Moved MPI::Init to constructor of SherpaHadronizer Fixed exceptional case handling in SherpaHadronizer Sep 9, 2021
@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 9, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35204/25147

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 9, 2021

Pull request #35204 was updated. @SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please check and sign again.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 9, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d59747/18433/summary.html
COMMIT: ab7bccc
CMSSW: CMSSW_12_1_X_2021-09-08-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35204/18433/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: 39
  • DQMHistoTests: Total histograms compared: 3001001
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3000973
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 38 files compared)
  • Checked 165 log files, 37 edm output root files, 39 DQM output files
  • TriggerResults: no differences found

@Dr15Jones
Copy link
Contributor Author

type bugfix

@Dr15Jones
Copy link
Contributor Author

urgent

we will need a backport to 10_6 for production.

@GurpreetSinghChahal
Copy link

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 9, 2021

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 Sep 9, 2021

+1

@@ -210,14 +218,12 @@ SherpaHadronizer::~SherpaHadronizer() {

bool SherpaHadronizer::initializeForInternalPartons() {
//initialize Sherpa but only once
throw cms::Exception("TEST");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Argg! This was left over from my testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #35224

@Dr15Jones Dr15Jones deleted the moveMPIInitSherpaHadronizer branch September 10, 2021 15:41
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