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

maxIterGPU assert failure in alpaka_serial_sync::pixelClustering::FindClus #44077

Closed
missirol opened this issue Feb 25, 2024 · 8 comments · Fixed by #44081
Closed

maxIterGPU assert failure in alpaka_serial_sync::pixelClustering::FindClus #44077

missirol opened this issue Feb 25, 2024 · 8 comments · Fixed by #44081

Comments

@missirol
Copy link
Contributor

missirol commented Feb 25, 2024

Running a recent HLT menu with customizeHLTforAlpaka in CMSSW_14_0_0 as in [1] leads to a runtime error.

cmsRun: src/RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/PixelClustering.h:302:
void alpaka_serial_sync::pixelClustering::FindClus<TrackerTraits>::operator()
(const TAcc&, SiPixelDigisSoAView, SiPixelClustersSoAView, unsigned int) const
[with TAcc = alpaka::AccCpuSerial<std::integral_constant<long unsigned int, 1>, unsigned int>;
TrackerTraits = pixelTopology::Phase1;
SiPixelDigisSoAView = SiPixelDigisLayout<>::ViewTemplateFreeParams<128, false, true, false>;
SiPixelClustersSoAView = SiPixelClustersLayout<>::ViewTemplateFreeParams<128, false, true, false>]:
Assertion `(hist.size() / blockDimension) < maxIterGPU' failed.

The full stack trace from running [1] can be found in pixel_findclus_cpu.log. Note that [1] forces the job to run on CPU only.

A similar crash occurs also on GPU (stack track in pixel_findclus_gpu.log), but a GPU is not needed to reproduce the issue.

There is no runtime error if the Alpaka customisation is not used.

Could experts please have a look ?

FYI: @AdrianoDee @borzari @fwyzard @cms-sw/hlt-l2

[1]

#!/bin/bash

# CMSSW_14_0_0

hltGetConfiguration \
  /dev/CMSSW_14_0_0/GRun/V33 \
  --globaltag 140X_dataRun3_HLT_v1 \
  --max-events -1 \
  --input foo.root \
  --no-output \
  --no-prescale \
  --customise HLTrigger/Configuration/customizeHLTforAlpaka.customizeHLTforAlpaka \
  > hlt.py

cat <<@EOF >> hlt.py

del process.MessageLogger
process.load('FWCore.MessageLogger.MessageLogger_cfi')

process.options.numberOfThreads = 1
process.options.numberOfStreams = 0

process.source.fileNames = [
    '/store/data/Run2023D/EphemeralHLTPhysics0/RAW/v1/000/370/293/00000/303b0104-65f3-4518-8b32-8de062eb9713.root',
]

process.options.accelerators = ['cpu']

process.source.skipEvents = cms.untracked.uint32(109)
@EOF

edmConfigDump hlt.py > hlt_dump.py

cmsRun hlt.py &> hlt.log

PS. Just for my own reference, I encountered this crash while testing a recent HLT menu in 14_0_X on one of the HiLTON nodes as described here.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 25, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @missirol.

@rappoccio, @makortel, @antoniovilela, @Dr15Jones, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@mmusich
Copy link
Contributor

mmusich commented Feb 25, 2024

assign heterogeneous, reconstruction, hlt

@cms-sw/trk-dpg-l2 FYI

@cmsbuild
Copy link
Contributor

New categories assigned: heterogeneous,reconstruction,hlt

@Martin-Grunewald,@mmusich,@fwyzard,@jfernan2,@makortel,@mandrenguyen you have been requested to review this Pull request/Issue and eventually sign? Thanks

@fwyzard
Copy link
Contributor

fwyzard commented Feb 25, 2024

The assertion fails because in RecoLocalTracker/SiPixelClusterizer/plugins/alpaka/PixelClustering.h we end up with

hist.size(): 4529
block elements: 256

that require 17 iterations, while maxIterGPU is 16... so 17 < 16 fails.

In the CUDA version the block size is 384 (to accommodate for TrackerTraits::maxPixInModule which is 6000, divided by 16 and round up by 128).
In the alpaka version the block size is 256 (which seems arbitrary).

@fwyzard
Copy link
Contributor

fwyzard commented Feb 26, 2024

Should be fixed by #44081 and #44082.

@mmusich
Copy link
Contributor

mmusich commented Feb 26, 2024

+hlt

explicitly tested with:

cmsrel CMSSW_14_0_0
cd CMSSW_14_0_0/src/
cmsenv
git cms-merge-topic 44082
scram b -j 20

and then following the recipe at #44077 (comment)

@fwyzard
Copy link
Contributor

fwyzard commented Feb 26, 2024

+heterogeneous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants