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

[GEOMETRY-UPGRADE] [CLANG] Fixes warnings reported by clang 14 #40507

Merged
merged 1 commit into from Jan 19, 2023

Conversation

smuzaffar
Copy link
Contributor

This PR fixes clang 14 warnings about the use of bitwise '&' with boolean operands

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40507/33703

  • There are other open Pull requests which might conflict with changes you have proposed:

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

  • Geometry/MTDGeometryBuilder (geometry, upgrade)

@civanch, @Dr15Jones, @bsunanda, @makortel, @ianna, @mdhildreth, @cmsbuild, @AdrianoDee, @srimanob can you please review it and eventually sign? Thanks.
@trtomei, @bsunanda, @beaucero, @fabiocos this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor Author

please test

Copy link
Contributor

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smuzaffar - Thanks! Indeed this should be the only change in comparison with the
#40509 because the preshower detector is not present in the upgrade geometry configuration.

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6403b7/29974/summary.html
COMMIT: 8e8a6a6
CMSSW: CMSSW_13_0_X_2023-01-13-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40507/29974/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

The relvals timed out after 4 hours.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 11 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555538
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555507
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Jan 14, 2023

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6403b7/29993/summary.html
COMMIT: 8e8a6a6
CMSSW: CMSSW_13_0_X_2023-01-13-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40507/29993/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 15 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555538
  • DQMHistoTests: Total failures: 12
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555504
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Jan 15, 2023

@smuzaffar , what about lines 134 and 136 - there is no warnings as in 138? By lines are basically the same.

@smuzaffar
Copy link
Contributor Author

@civanch , you are right, there are few places where compiler is not complaining. I guess when compiler sees a simple arithematic in the logic then it does not complian but if it see bit complex logic e.g. calls to other funxtions ( even if they are inlined) then it complains. I would suggest to keep the line 134/136 as it is for now

@civanch
Copy link
Contributor

civanch commented Jan 15, 2023

+1

Copy link
Contributor

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@civanch - I think, there is no need to modify the lines 134 and 136. See my comment.

@@ -136,7 +136,7 @@ class RectangularMTDTopology final : public PixelTopology {
bool isItEdgePixelInY(int iybin) const override { return ((iybin == 0) | (iybin == (m_ncols - 1))); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't obvious that || would be faster. The "short-circuit" evaluation means that the || operator must come with a branch, unlike |. However, looking at this particular method Clang generates exactly the same code (with optimisation enabled - at least -O1):
Screenshot 2023-01-15 at 16 18 43

@srimanob
Copy link
Contributor

+Upgrade

Technical PR.

Not sure if @smuzaffar has a comment to #40507 (comment)

@cmsbuild
Copy link
Contributor

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

@rappoccio
Copy link
Contributor

+1

Technical change.

@cmsbuild cmsbuild merged commit 7315768 into cms-sw:master Jan 19, 2023
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.

None yet

6 participants