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

CalorimeterDefinitions: don't return -1 as uint32_t #44608

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

iarspider
Copy link
Contributor

@iarspider iarspider commented Apr 4, 2024

PR description:

I have checked all usages of detId2denseId, and there is no explicit comparison with -1 or similar value, so I think it's safe to return 0 instead of (unit32_t) -1.

For reference: gcc13 emits a warning link

src/RecoParticleFlow/PFRecHitProducer/plugins/alpaka/CalorimeterDefinitions.h(104): warning #68-D: integer conversion resulted in a change of sign
        return -1;
               ^

PR validation:

Bot tests

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 4, 2024

cms-bot internal usage

@iarspider
Copy link
Contributor Author

please test for el8_amd64_gcc13
build will most likely fail, but the warning should be gone

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 4, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44608/39797

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 4, 2024

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

It involves the following packages:

  • RecoParticleFlow/PFRecHitProducer (reconstruction)

@mandrenguyen, @jfernan2 can you please review it and eventually sign? Thanks.
@mmarionncern, @lgray, @seemasharmafnal, @hatakeyamak, @missirol this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@iarspider
Copy link
Contributor Author

please test for el9_amd64_gcc13

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 4, 2024

-1

Failed Tests: Build HeaderConsistency
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8c22e8/38593/summary.html
COMMIT: f0e4f78
CMSSW: CMSSW_14_1_X_2024-04-01-2300/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/44608/38593/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8c22e8/38593/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8c22e8/38593/git-merge-result

Build

I found compilation error when building:

/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02831/el9_amd64_gcc13/external/gcc/13.2.0-1b0a3367d04f48f01ad3ccf40e55475c/bin/../lib/gcc/x86_64-redhat-linux-gnu/13.2.0/../../../../x86_64-redhat-linux-gnu/bin/ld.bfd: cannot find -lSimDataFormatsTrackingAnalysis: No such file or directory
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02831/el9_amd64_gcc13/external/gcc/13.2.0-1b0a3367d04f48f01ad3ccf40e55475c/bin/../lib/gcc/x86_64-redhat-linux-gnu/13.2.0/../../../../x86_64-redhat-linux-gnu/bin/ld.bfd: cannot find -lDataFormatsTrackReco: No such file or directory
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02831/el9_amd64_gcc13/external/gcc/13.2.0-1b0a3367d04f48f01ad3ccf40e55475c/bin/../lib/gcc/x86_64-redhat-linux-gnu/13.2.0/../../../../x86_64-redhat-linux-gnu/bin/ld.bfd: cannot find -lDataFormatsTrackCandidate: No such file or directory
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02831/el9_amd64_gcc13/external/gcc/13.2.0-1b0a3367d04f48f01ad3ccf40e55475c/bin/../lib/gcc/x86_64-redhat-linux-gnu/13.2.0/../../../../x86_64-redhat-linux-gnu/bin/ld.bfd: cannot find -lDataFormatsTrajectorySeed: No such file or directory
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02831/el9_amd64_gcc13/external/gcc/13.2.0-1b0a3367d04f48f01ad3ccf40e55475c/bin/../lib/gcc/x86_64-redhat-linux-gnu/13.2.0/../../../../x86_64-redhat-linux-gnu/bin/ld.bfd: cannot find -lDataFormatsTrackingRecHit: No such file or directory
collect2: error: ld returned 1 exit status
gmake: *** [tmp/el9_amd64_gcc13/src/Validation/RecoHI/plugins/CmsHiValidationPlugins/libCmsHiValidationPlugins.so] Error 1
Leaving library rule at src/Validation/RecoHI/plugins
>> Leaving Package Validation/RecoHI
>> Package Validation/RecoHI built
>> Entering Package CondFormats/External


@iarspider
Copy link
Contributor Author

failures are expected (unrelated)

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8c22e8/38618/summary.html
COMMIT: f0e4f78
CMSSW: CMSSW_14_1_X_2024-04-04-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/44608/38618/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@jfernan2
Copy link
Contributor

jfernan2 commented Apr 8, 2024

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 8, 2024

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. @sextonkennedy, @antoniovilela, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 720e154 into cms-sw:master Apr 8, 2024
12 of 13 checks passed
@fwyzard
Copy link
Contributor

fwyzard commented Apr 9, 2024

@fllor FYI

@fwyzard
Copy link
Contributor

fwyzard commented Apr 9, 2024

type pf

@cmsbuild cmsbuild added the pf label Apr 9, 2024
@fllor
Copy link
Contributor

fllor commented Apr 9, 2024

@fllor FYI

Thanks.

This return statement should never executed, so the returned value does not really matter.

@fwyzard
Copy link
Contributor

fwyzard commented Apr 21, 2024

Unfortunately it turns out that this change was a bad idea.

In fact, 0 is a perfectly valid compact id, so it should not be used for an invalid id.

The HCAL PF code (e.g. in RecoParticleFlow/PFRecHitProducer/plugins/alpaka/PFRecHitTopologyESProducer.cc) uses 0xffffffff to mark invalid det ids.

While that has its own problems (neighbours is of type int32_t, while the values returned by neighbours are of type uint32_t) it is at least consistent.
Changing the return value for invalid det id to 0 breaks the convention.

fwyzard added a commit to fwyzard/cmssw that referenced this pull request Apr 21, 2024
This reverts commit f0e4f78.

The change introduced by f0e4f78 / cms-sw#44608
returns a dense id of 0 for an invalid det id. However, 0 is a valid dense
id, and should not be used for an invalid det id.
@iarspider iarspider deleted the patch-3 branch June 14, 2024 09:17
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.

6 participants