-
Notifications
You must be signed in to change notification settings - Fork 4.6k
[GCC14]Fix array bound warnings #47634
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
[GCC14]Fix array bound warnings #47634
Conversation
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47634/44166
|
|
A new Pull Request was created by @smuzaffar for master. It involves the following packages:
@cmsbuild, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
please test for el8_amd64_gcc14 |
I'll have a look. |
|
-1 Failed Tests: UnitTests RelVals AddOn Unit TestsI found 2 errors in the following unit tests: ---> test deviceVertexFinderByDensity_tSerialSync had ERRORS ---> test deviceVertexFinderOneKernel_tSerialSync had ERRORS RelVals
AddOn TestsExpand to see more addon errors ... |
|
I'm still going through the details of the indices and ranges, but to first order I think GCC is wrong. I've run the for (auto j : cms::alpakatools::uniform_elements(acc, Hist::totbins())) {
printf("set hist.off[%d] to 0\n", j);
hist.off[j] = 0;
}On the CPU back-end: ./deviceVertexFinderByDensity_tSerialSync | grep 'set hist.off' | sort -k2.11,2.13g -u
set hist.off[0] to 0
set hist.off[1] to 0
set hist.off[2] to 0
set hist.off[3] to 0
set hist.off[4] to 0
...
set hist.off[253] to 0
set hist.off[254] to 0
set hist.off[255] to 0
set hist.off[256] to 0On the CUDA back-end: We never try to write to index |
|
In fact, with the proposed changes, the tests fail :-/ |
|
@fwyzard , yes I also have added some debug print outs and index
Previously we have suppressed this for RecoTracker/PixelSeeding via removing the array-bounds warnings from the compilation flags ( using pragma to suppress this warnings did not work for LTO). So I can update this PR to add |
a27faa3 to
8643ca7
Compare
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47634/44209
|
|
Pull request #47634 was updated. @cmsbuild, @jfernan2, @mandrenguyen can you please check and sign again. |
|
please test for el8_amd64_gcc14 |
|
+heterogeneous |
|
please test lets run the tests for production arch too |
|
+1 Size: This PR adds an extra 20KB to repository Comparison SummarySummary:
|
|
+1 |
|
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. @mandrenguyen, @rappoccio, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f42cc9/45166/summary.html Comparison SummarySummary:
|
|
+1 |
workaround to suppress the array-bound warning in LTO builds
This is an attempt to fix the array bound warning we get in GCC14 IBs [a].
Size of array
I m_v[S];at https://github.com/cms-sw/cmssw/blob/master/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h#L21 is257viatotbins()at https://github.com/cms-sw/cmssw/blob/master/HeterogeneousCore/CUDAUtilities/interface/HistoContainer.h#L125 return 257 and then https://github.com/cms-sw/cmssw/blob/master/RecoVertex/PixelVertexFinding/plugins/alpaka/clusterTracksByDensity.h#L61-L63 tries to initialize/accessm_v[257]which is out of array bound.Either
totbins()should returnNHISTS * NBINSinstead ofNHISTS * NBINS +1or we loop over 1 less element.@fwyzard, if this is not the correct fix then feel free to propose a correct fix.
[a] https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/el8_amd64_gcc14/CMSSW_15_1_X_2025-03-18-2300/RecoVertex/PixelVertexFinding