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

[llvm14][Sim] Fixed set but not used variables warnings #40312

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

smuzaffar
Copy link
Contributor

In CLANG IBs ( with llvm 14), we see few warnings about variable set but not used. This PR fixes few of those for Sim packages. I also cleanup some dead code which was not doing any thing, please let me know if this code should be deleted instead of commenting out.

@smuzaffar smuzaffar changed the title Llvm warn sim1 [llvm14][Sim] Fixed set but not used variables warnings Dec 13, 2022
@cmsbuild cmsbuild added this to the CMSSW_13_0_X milestone Dec 13, 2022
@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40312/33386

ERROR: Build errors found during clang-tidy run.

SimCalorimetry/HcalSimAlgos/src/HcalSiPMHitResponse.cc:173:7: error: use of undeclared identifier 'elapsedTime' [clang-diagnostic-error]
      elapsedTime += dt;
      ^
Suppressed 823 warnings (822 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@civanch
Copy link
Contributor

civanch commented Dec 14, 2022

I will try to study R-hadron hadronic physics code (which is really messy). @bsunanda , can you, please, have a look into test codes for forward detectors? In general, it is OK to remove commented lines. What I am not sure is Bsc modifications.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40312/33388

  • This PR adds an extra 76KB to repository

@perrotta
Copy link
Contributor

perrotta commented Jan 5, 2023

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 5, 2023

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

It involves the following packages:

  • SimCalorimetry/HcalSimAlgos (simulation)
  • SimG4CMS/Calo (simulation)
  • SimG4CMS/FP420 (simulation)
  • SimG4CMS/Forward (simulation)
  • SimG4Core/CustomPhysics (simulation)

@civanch, @mdhildreth can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @rovere, @bsunanda, @thomreis, @simonepigazzini, @mariadalfonso, @sameasy, @abdoulline, @fabiocos, @slomeo 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

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 5, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c77681/29802/summary.html
COMMIT: 7db0003
CMSSW: CMSSW_13_0_X_2023-01-04-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40312/29802/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: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555748
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555720
  • 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 11, 2023

+1

@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)

@perrotta
Copy link
Contributor

@civanch this PR comments out a lot of (by now dead) code.
Wouldn't it be preferable to clean it up and remove these commented out parts completely from the code?
If you agree we can ask @smuzaffar to complete the cleaning and remove them, otherwise we will merge this PR as it is.

@civanch
Copy link
Contributor

civanch commented Jan 11, 2023

@perrotta , this is a very old code (was written ~20 years ago) for R-hadron interaction with matter. In my view, there is no real physics model behind but something very approximate. However, when I asked in Exotica group if we should rewrite this code or keep as it is they answer: "please, keep".

I would propose to merge this PR as it is. I will try to find out a time to, at least, put comments explaining (first of all to myself)), what the code is doing and will remove commented lines. I will just create an issue for that. This PR may be merged.

@perrotta
Copy link
Contributor

+1

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.

4 participants