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

Fix uploading EventSetup conditions from multiple CUDA streams #34725

Merged

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Aug 2, 2021

PR description:

When multiple CUDA streams are trying to initialise the same EventSetup object, the first one to do so starts the asynchronous operations, and the others are supposed to wait for it to finish. However, code for recording the CUDA event was missing, so the other streams would find the default- constructed event, which is always "valid".

Adding the missing call to record the event fixes the problem.

PR validation:

Without this PR, running multiple jobs with few threads each crashes fairly soon:

Running indefinitely over 10100 events with 4 jobs, each with 3 threads, 3 streams and 1 GPUs
   373.5 ±   0.1 ev/s (10000 events, 99.8% overlap)
   366.1 ±   0.1 ev/s (10000 events, 99.8% overlap)
   363.5 ±   0.1 ev/s (10000 events, 99.8% overlap)
   362.4 ±   0.1 ev/s (10000 events, 100.0% overlap)
   362.4 ±   0.1 ev/s (10000 events, 99.7% overlap)
The underlying cmsRun job was killed by signal 6

The last lines of the error log are:
Module: none
Module: CAHitNtupletCUDA:hltPixelTracksCUDA
Module: CAHitNtupletCUDA:hltPixelTracksCUDA
Module: CAHitNtupletCUDA:hltPixelTracksCUDA
Module: CAHitNtupletCUDA:hltPixelTracksCUDA

A fatal system signal has occurred: abort signal

With this PR, no crash is observed after a large number of tests:

Running indefinitely over 10100 events with 4 jobs, each with 3 threads, 3 streams and 1 GPUs
   372.1 ±   0.1 ev/s (10000 events, 99.9% overlap)
   365.3 ±   0.1 ev/s (10000 events, 99.9% overlap)
   362.5 ±   0.1 ev/s (10000 events, 99.9% overlap)
   361.9 ±   0.1 ev/s (10000 events, 99.6% overlap)
   361.0 ±   0.1 ev/s (10000 events, 99.9% overlap)
   361.3 ±   0.1 ev/s (10000 events, 99.6% overlap)
   361.7 ±   0.1 ev/s (10000 events, 99.9% overlap)
   361.0 ±   0.1 ev/s (10000 events, 99.7% overlap)
   361.2 ±   0.1 ev/s (10000 events, 99.9% overlap)
   361.0 ±   0.1 ev/s (10000 events, 100.0% overlap)
   361.2 ±   0.1 ev/s (10000 events, 99.9% overlap)
   361.8 ±   0.1 ev/s (10000 events, 100.0% overlap)
   361.7 ±   0.1 ev/s (10000 events, 99.8% overlap)
   360.9 ±   0.1 ev/s (10000 events, 99.8% overlap)
   361.2 ±   0.1 ev/s (10000 events, 99.9% overlap)
   361.6 ±   0.1 ev/s (10000 events, 99.9% overlap)
   ...

When multiple CUDA streams are trying to initialise the same EventSetup object, the first one to do
so starts the asynchronous operations, and the others are supposed to wait for it to finish.
However, code for recording the CUDA event was missing, so the other streams would find the default-
constructed event, which is always "valid".

Adding the missing call to record the event fixes the problem.
@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 2, 2021

type bugifx

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 2, 2021

please test

@fwyzard fwyzard changed the title Fix uploading the EventSetup conditions from multiple CUDA streams Fix uploading EventSetup conditions from multiple CUDA streams Aug 2, 2021
@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 2, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34725/24367

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 2, 2021

A new Pull Request was created by @fwyzard (Andrea Bocci) for master.

It involves the following packages:

  • HeterogeneousCore/CUDACore (heterogeneous)

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

cms-bot commands are listed here

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 2, 2021

enable gpu

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 2, 2021

please test

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 2, 2021

+heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 2, 2021

This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy, @perrotta (and backports should be raised in the release meeting by the corresponding L2)

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 2, 2021

-1

Failed Tests: RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f2b05a/17424/summary.html
COMMIT: 03b30c3
CMSSW: CMSSW_12_1_X_2021-08-02-1100/slc7_amd64_gcc900
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/34725/17424/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 11634.2411634.24_TTbar_14TeV+2021_0T+TTbar_14TeV_TuneCP5_GenSimINPUT+Digi+Reco+HARVEST+ALCA/step2_TTbar_14TeV+2021_0T+TTbar_14TeV_TuneCP5_GenSimINPUT+Digi+Reco+HARVEST+ALCA.log
  • 11601.011601.0_SingleElectronPt10+2021+SingleElectronPt10_pythia8_GenSimINPUT+Digi+Reco+HARVEST+ALCA/step2_SingleElectronPt10+2021+SingleElectronPt10_pythia8_GenSimINPUT+Digi+Reco+HARVEST+ALCA.log
  • 11602.011602.0_SingleElectronPt35+2021+SingleElectronPt35_pythia8_GenSimINPUT+Digi+Reco+HARVEST+ALCA/step2_SingleElectronPt35+2021+SingleElectronPt35_pythia8_GenSimINPUT+Digi+Reco+HARVEST+ALCA.log
Expand to see more relval errors ...

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 19735
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 19729
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 3 files compared)
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: no differences found

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 39
  • DQMHistoTests: Total histograms compared: 2998564
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2998541
  • 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

@perrotta
Copy link
Contributor

perrotta commented Aug 3, 2021

+1
(The errors on RelVal inputs repeat identically in several unrelated PR tests, no need to relaunch the tests here hoping for a better result)

@perrotta
Copy link
Contributor

perrotta commented Aug 3, 2021

merge

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

3 participants