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

[GCC13] Suppress array-bound error #45179 from PixelSeeding #45340

Closed
wants to merge 1 commit into from

Conversation

smuzaffar
Copy link
Contributor

Fixes #45179

This PR suppresses the array-bound error for RecoTracker/PixelSeeding . It should fix the build errors we get in GCC 13 IBs

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 28, 2024

cms-bot internal usage

@smuzaffar
Copy link
Contributor Author

please test with #45335 for el9_amd64_gcc13

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45340/40753

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar for master.

It involves the following packages:

  • RecoTracker/PixelSeeding (reconstruction)

@jfernan2, @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, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor Author

please test

@smuzaffar smuzaffar changed the title [GCC13] Suppress array-bound error #45179 [GCC13] Suppress array-bound error #45179 from PixelSeeding Jun 28, 2024
@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests RelVals
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a0b315/40144/summary.html
COMMIT: 013d2db
CMSSW: CMSSW_14_1_X_2024-06-26-1200/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45340/40144/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 4 errors in the following unit tests:

---> test testTauEmbeddingWorkflow2016preVFP had ERRORS
---> test testTauEmbeddingWorkflow2017 had ERRORS
---> test testTauEmbeddingWorkflow2016postVFP had ERRORS
and more ...

RelVals

  • 29634.911A fatal system signal has occurred: segmentation violation

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a0b315/40145/summary.html
COMMIT: 013d2db
CMSSW: CMSSW_14_1_X_2024-06-28-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45340/40145/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

@mandrenguyen
Copy link
Contributor

What's up with the failed relvals and unit tests?

@iarspider
Copy link
Contributor

What's up with the failed relvals and unit tests?

RelVal: #41927
Unit tests: #45288

@smuzaffar
Copy link
Contributor Author

What's up with the failed relvals and unit tests?

@mandrenguyen , failed workflows and relvals are for el8/gcc13 , so please ignore those. For productiuon arch , PR results #45340 (comment) look good

@fwyzard
Copy link
Contributor

fwyzard commented Jul 1, 2024

assign heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 1, 2024

New categories assigned: heterogeneous

@fwyzard,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@mandrenguyen
Copy link
Contributor

+1

@iarspider
Copy link
Contributor

@cms-sw/heterogeneous-l2 gentle ping

@fwyzard
Copy link
Contributor

fwyzard commented Jul 9, 2024

Rather than changing the flags in the BuildFile.xml of RecoTracker/PixelSeeding/plugins, which simply uses the code, it would be better to push/pop the warning flags in the header itself.

@fwyzard
Copy link
Contributor

fwyzard commented Jul 9, 2024

-heterogeneous

@smuzaffar
Copy link
Contributor Author

@fwyzard , I tried disabling the warning using #pragma push ... pop but that did not work. I can try again but feel free to open a PR with the proper fix

@smuzaffar
Copy link
Contributor Author

@fwyzard , these warnings ( and errors for GCC 13) only happen when we link serial backend [a]. There is one warning for each of https://github.com/cms-sw/cmssw/blob/master/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGeneratorKernels.dev.cc#L559-L561. Warning array subscript corresponds to maxNumberOfTuples of these pixelTopology::* structures

[a]

>> Building alpaka/serial edm plugin tmp/el8_amd64_gcc12/src/RecoTracker/PixelSeeding/plugins/RecoTrackerPixelSeedingPortableSerialSync/libRecoTrackerPixelSeedingPortableSerialSync.so
In member function 'operator[]',
    inlined from 'size' at src/HeterogeneousCore/AlpakaInterface/interface/OneToManyAssoc.h:144:55,
    inlined from 'operator()' at src/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGeneratorKernelsImpl.h:553:42,
.....
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h:15:60: warning: array subscript 32769 is above array bounds of 'const unsigned int[32769]' [-Warray-bounds]
   15 |     constexpr const I& operator[](int i) const { return m_v[i]; }
      |                                                            ^
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h: In member function 'operator()':
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h:21:7: note: while referencing 'm_v'
   21 |     I m_v[S];
      |       ^
In member function 'operator[]',
    inlined from 'size' at src/HeterogeneousCore/AlpakaInterface/interface/OneToManyAssoc.h:144:55,
    inlined from 'operator()' at src/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGeneratorKernelsImpl.h:553:42,
....
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h:15:60: warning: array subscript 262145 is above array bounds of 'const unsigned int[262145]' [-Warray-bounds]
   15 |     constexpr const I& operator[](int i) const { return m_v[i]; }
      |                                                            ^
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h: In member function 'operator()':
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h:21:7: note: while referencing 'm_v'
   21 |     I m_v[S];
      |       ^
In member function 'operator[]',
    inlined from 'size' at src/HeterogeneousCore/AlpakaInterface/interface/OneToManyAssoc.h:144:55,
    inlined from 'operator()' at src/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGeneratorKernelsImpl.h:553:42,
...
src/HeterogeneousCore/AlpakaInterface/interface/FlexiStorage.h:15:60: warning: array subscript 262145 is above array bounds of 'const unsigned int[262145]' [-Warray-bounds]
   15 |     constexpr const I& operator[](int i) const { return m_v[i]; }

@fwyzard
Copy link
Contributor

fwyzard commented Jul 10, 2024

Thanks for the detailed pointers, I'll have a look.

@fwyzard
Copy link
Contributor

fwyzard commented Jul 10, 2024

@fwyzard , I tried disabling the warning using #pragma push ... pop but that did not work. I can try again but feel free to open a PR with the proper fix

I started looking into it, and quickly ended up on the GCC Bugzilla:

:-/

@fwyzard
Copy link
Contributor

fwyzard commented Jul 10, 2024

@smuzaffar is there a way to put these flags into HeterogeneousCore/AlpakaInterface/BuildFile.xml, so that all libraries that depend on HeterogeneousCore/AlpakaInterface get them ?

@smuzaffar
Copy link
Contributor Author

smuzaffar commented Jul 10, 2024

@fwyzard , SCRAM does not export cxxflags from BuildFiles. Only way to export flags is to define a toolfile e.g. array-bound-flag.xml and then add a dependency on it using <use name="array-bound-flag"/> .

Adding such a dependency in HeterogeneousCore/AlpakaInterface/BuildFile.xml means these flags will be passed to all packages ( for default libs/plugins and alpaka backends) which depend on HeterogeneousCore/AlpakaInterface. I would suggest to add array-bound-flag.xml and for now only add it for serail backend of RecoTrackerPixelSeedingPortable e.g. using the following in https://github.com/cms-sw/cmssw/blob/master/RecoTracker/PixelSeeding/plugins/BuildFile.xml#L33

<use name="array-bound-flag" for="alpaka/serail"/>

@smuzaffar
Copy link
Contributor Author

@fwyzard , should we go with the solution I have proposed in #45340 (comment) ?

@fwyzard
Copy link
Contributor

fwyzard commented Jul 15, 2024

Sorry for the delay, I'm slowly catching up after last week's hackathon.

I do like the solution you proposed in #45340 (comment) - but I don't want to push for the extra complexity.

So I'm also fine with adding the flags explicitly in RecoTracker/PixelSeeding/plugins/BuildFile.xml. If you add the CXXFLAGS, can they be added only for="alpaka/serail" ?

@smuzaffar
Copy link
Contributor Author

If you add the CXXFLAGS, can they be added only for="alpaka/serail" ?

<flag CXXFLAGS="flags" for="xyz" > is doable but requires SCRAM and BuildRules changes. I think scram should support it but being a flag it will not be exported to dependent packages.
<use name="array-bound-flag" for="alpaka/serail"/> is already supported and exported by default to dependent packages

@fwyzard
Copy link
Contributor

fwyzard commented Jul 15, 2024

OK, then let's take the fix that requires minimal changes in SCRAM and in the externals (i.e. this one) and replace it with something better if you make changes to SCRAM or if we need to use the same flags somewhere else ?

@smuzaffar
Copy link
Contributor Author

byt he way, we already have ofast-flag toolfile used by various cmssw packages . To avoid exporting such a dependency to dependent packages one can add NO_RECURSIVE_EXPORT flag in toolfile

@fwyzard
Copy link
Contributor

fwyzard commented Jul 15, 2024

Should we rerun the gcc13 tests ?

@smuzaffar
Copy link
Contributor Author

please test for el9_amd64_gcc13

@fwyzard
Copy link
Contributor

fwyzard commented Jul 15, 2024

To avoid exporting such a dependency to dependent packages one can add NO_RECURSIVE_EXPORT flag in toolfile

Ah, I see.

The code that requires the extra flag is in a header file, so I think in this case we should propagate the flag to the packages that depend on it.

@fwyzard
Copy link
Contributor

fwyzard commented Jul 15, 2024

Does cms-sw/cmsdist#9301 look OK ?

@smuzaffar
Copy link
Contributor Author

Does cms-sw/cmsdist#9301 look OK ?

thanks @fwyzard , yes it looks good.
I can update this PR to use the new tool or feel free to open a new PR

@fwyzard
Copy link
Contributor

fwyzard commented Jul 15, 2024

I've opened #45455

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a0b315/40388/summary.html
COMMIT: 013d2db
CMSSW: CMSSW_14_1_X_2024-07-12-2300/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45340/40388/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 14747 lines to the logs
  • Reco comparison results: 61320 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3451616
  • DQMHistoTests: Total failures: 359210
  • DQMHistoTests: Total nulls: 228
  • DQMHistoTests: Total successes: 3092158
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -1.1780000000000002 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): -0.063 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 13034.0 ): 0.799 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 140.043 ): -0.004 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 250202.181 ): -0.112 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 25202.0 ): 0.064 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 7.3 ): -1.600 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 8.0 ): -0.262 KiB SiStrip/MechanicalView
  • Checked 206 log files, 170 edm output root files, 49 DQM output files

@smuzaffar
Copy link
Contributor Author

closing this in favor of #45455

@smuzaffar smuzaffar closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment