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

Make calls to TH2F::Projection thread-safe #21995

Merged
merged 1 commit into from
Jan 30, 2018

Conversation

Dr15Jones
Copy link
Contributor

The histogram returned from TH2F::Projection* may be the same one
as another thread if the name given is the same across the threads.
Using a unique name and using a TDirectory::TContext will prevent the
sharing across threads.

The histogram returned from TH2F::Projection* may be the same one
as another thread if the name given is the same across the threads.
Using a unique name and using a TDirectory::TContext will prevent the
sharing across threads.
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 26, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/25673/console Started: 2018/01/27 01:56

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

RecoVertex/BeamSpotProducer

@perrotta, @ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @slava77, @lpernie can you please review it and eventually sign? Thanks.
@ghellwig, @makortel, @felicepantaleo, @GiacomoSguazzoni, @tocheng, @VinInn, @ebrondol, @rovere, @mmusich, @dgulhan this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

-1

Tested at: cdf802c

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-21995/25673/summary.html

I found follow errors while testing this PR

Failed tests: RelVals

  • RelVals:

The relvals timed out after 2 hours.
When I ran the RelVals I found an error in the following worklfows:
4.22 step2

runTheMatrix-results/4.22_RunCosmics2011A+RunCosmics2011A+RECOCOSD+ALCACOSD+SKIMCOSD+HARVESTDC/step2_RunCosmics2011A+RunCosmics2011A+RECOCOSD+ALCACOSD+SKIMCOSD+HARVESTDC.log

136.7611 step2
runTheMatrix-results/136.7611_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM/step2_RunJetHT2016E_reminiaod+RunJetHT2016E_reminiaod+REMINIAOD_data2016_HIPM+HARVESTDR2_REMINIAOD_data2016_HIPM.log

@cmsbuild
Copy link
Contributor

Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped)

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 27, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/25678/console Started: 2018/01/27 15:06

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-21995/25678/summary.html

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /build/cmsbld/jenkins/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-21995/1325.7_TTbar_13_94XNanoAODINPUT+TTbar_13_94XNanoAODINPUT+NANOEDMMC2017

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 26
  • DQMHistoTests: Total histograms compared: 2464350
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2464180
  • DQMHistoTests: Total skipped: 169
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.15999999995 KiB( 22 files compared)
  • Checked 110 log files, 9 edm output root files, 26 DQM output files

@fabiocos
Copy link
Contributor

@slava77 @perrotta @lpernie @arunhep could you please inspect and sign at your earliest convenience?

@ghellwig
Copy link

+1

@fabiocos
Copy link
Contributor

@slava77 @perrotta could you please check and sign?

TH1F *h1PVz = (TH1F*) hPVx->ProjectionY("h1PVz", 0, -1, "e");
//need to create a unique histogram name to avoid ROOT trying to re-use one
// also tell ROOT to hide its global state
TDirectory::TContext guard{nullptr};
Copy link
Contributor

Choose a reason for hiding this comment

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

@Dr15Jones : mainly for my own education, could you please explain what this line is meant to? Thank you!
Also the class documentation in root doesn't look very explanatory to me:
https://root.cern.ch/doc/master/classTDirectory_1_1TContext.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This temporarily sets the global gDirectory pointer to nullptr which avoids accidental sharing across threads. When TDirectory::TContext is deleted, it rests gDirectory back to what it was before the constructor was called.

@perrotta
Copy link
Contributor

perrotta commented Jan 29, 2018

+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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b451097 into cms-sw:master Jan 30, 2018
@Dr15Jones
Copy link
Contributor Author

This change appears to have been insufficient. We are still seeing random crashes in the IB from the fits.

@Dr15Jones Dr15Jones deleted the fixPVFitter branch February 5, 2018 21: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