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

[14.0.X] TrackingRecHitsSoACollection: early return hostData in CopyHost::copyAsync() when there aren't hits #45858

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Sep 2, 2024

backport of #45837

PR description:

This PR is meant as a fix for #45834, and builds on top of the earlier fix #45744 or issue #45708.
In a nutshell, CopyHost::copyAsync() returns before the alpaka::memcpy call in TrackingRecHitsSoACollection if the size() of the input deviceData is null (i.e. there are no input hits).
Additionally protect CAHitNtupletGenerator by returning before launching kernels when there are less than 2 hits.

PR validation:

Multiple tests have been performed with this branch:

I tested successfully (on lxplus8-gpu):

Additionally, following the example at #45834 (comment) I I feed the "alpaka-migrated" menu from CMSHLT-3284 into the relval machinery via:

cmsrel CMSSW_14_0_15
cd CMSSW_14_0_15/src
cmsenv
git cms-addpkg HLTrigger/Configuration
git cms-addpkg Configuration/PyReleaseValidation
hltGetConfiguration /users/soohwan/HLT_140X/Alpaka/HIonV173/V10 \
   --globaltag auto:phase1_2024_realistic \
   --mc \
   --unprescale \
   --cff > "${CMSSW_BASE}"/src/HLTrigger/Configuration/python/HLT_User_cff.py
scram b -j 20   

and then apply the following patch:

diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
index 8a70a74aa0c..f9dc0a0397f 100644
--- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
+++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py
@@ -2865,7 +2865,7 @@ upgradeProperties[2017] = {
     '2022HI' : {
         'Geom' : 'DB:Extended',
         'GT':'auto:phase1_2022_realistic_hi',
-        'HLTmenu': '@fake2',
+        'HLTmenu': 'User',
         'Era':'Run3_pp_on_PbPb',
         'BeamSpot': 'DBrealistic',
         'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
@@ -2873,7 +2873,7 @@ upgradeProperties[2017] = {
     '2022HIRP' : {
         'Geom' : 'DB:Extended',
         'GT':'auto:phase1_2022_realistic_hi',
-        'HLTmenu': '@fake2',
+        'HLTmenu': 'User',
         'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
         'BeamSpot': 'DBrealistic',
         'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
@@ -2881,7 +2881,7 @@ upgradeProperties[2017] = {
     '2023HI' : {
         'Geom' : 'DB:Extended',
         'GT':'auto:phase1_2023_realistic_hi',
-        'HLTmenu': '@fake2',
+        'HLTmenu': 'User',
         'Era':'Run3_pp_on_PbPb',
         'BeamSpot': 'DBrealistic',
         'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
@@ -2889,7 +2889,7 @@ upgradeProperties[2017] = {
     '2023HIRP' : {
         'Geom' : 'DB:Extended',
         'GT':'auto:phase1_2023_realistic_hi',
-        'HLTmenu': '@fake2',
+        'HLTmenu': 'User',
         'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
         'BeamSpot': 'DBrealistic',
         'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],

in a release that I have prepared with this and then finally run:

  • runTheMatrix.py --what upgrade -l 15261.0 --maxSteps 2 (neutrino gun input)
  • runTheMatrix.py --what upgrade -l 15224.0 --maxSteps 2 (TTbar input)

Both tests run fine.

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 #45837 to CMSSW_14_0_X for data-taking purposes.

@mmusich
Copy link
Contributor Author

mmusich commented Sep 2, 2024

type bug-fix

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

A new Pull Request was created by @mmusich for CMSSW_14_0_X.

It involves the following packages:

  • DataFormats/TrackingRecHitSoA (heterogeneous, reconstruction)
  • RecoTracker/PixelSeeding (reconstruction)

@cmsbuild, @fwyzard, @jfernan2, @makortel, @mandrenguyen can you please review it and eventually sign? Thanks.
@GiacomoSguazzoni, @JanFSchulte, @VinInn, @VourMa, @dgulhan, @felicepantaleo, @gpetruc, @missirol, @mmusich, @mtosi, @rovere this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

cms-bot internal usage

@fwyzard
Copy link
Contributor

fwyzard commented Sep 2, 2024

enable gpu

@fwyzard
Copy link
Contributor

fwyzard commented Sep 2, 2024

please test

@fwyzard
Copy link
Contributor

fwyzard commented Sep 2, 2024

+heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

+1

Size: This PR adds an extra 20KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ebf107/41223/summary.html
COMMIT: 02d008f
CMSSW: CMSSW_14_0_X_2024-09-02-1100/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45858/41223/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

GPU Comparison Summary

Summary:

@jfernan2
Copy link
Contributor

jfernan2 commented Sep 3, 2024

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2024

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

@cmsbuild cmsbuild removed the backport label Sep 3, 2024
@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit a7fc774 into cms-sw:CMSSW_14_0_X Sep 4, 2024
12 checks passed
@mmusich mmusich deleted the mm_fix_TrackingRecHitsSoACollection_14_0_X branch September 4, 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