Skip to content

[ML] [Clang]Cleanup clang-analyzer warnings #46318

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2024

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2024

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

It involves the following packages:

  • PhysicsTools/MVAComputer (ml)

@cmsbuild, @valsdav, @y19y19 can you please review it and eventually sign? Thanks.
@AlexDeMoor, @Ming-Yan, @Senphy, @andrzejnovak, @castaned this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

store = nullptr;
assert(words);
store = new Word_t[words];
std::memcpy(store, orig.store, words * sizeof(Word_t));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume that bits_ > 0 and in that case bitsToWords(bits_) should always return words>0

store = nullptr;
assert(words);
store = new Word_t[words];
std::memset(store, 0, sizeof(Word_t) * words);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume that bits_ > 0 and in that case bitsToWords(bits_) should always return words>0

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2024

-1

Failed Tests: UnitTests RelVals RelVals-INPUT AddOn
Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9a33d4/42072/summary.html
COMMIT: 9b39e0a
CMSSW: CMSSW_14_2_X_2024-10-09-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46318/42072/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 3 errors in the following unit tests:

---> test testPhysicsToolsMVAComputer had ERRORS
---> test runtestTqafTopJetCombination had ERRORS
---> test runtestTqafTopEventSelection had ERRORS

RelVals

  • 135.4A fatal system signal has occurred: abort signal
  • 5.1A fatal system signal has occurred: abort signal
  • 9.0A fatal system signal has occurred: abort signal
Expand to see more relval errors ...

RelVals-INPUT

  • 4.64.6_MinimumBias2010A/step2_MinimumBias2010A.log
  • 136.901136.901_RunDoubleMuon2016C/step2_RunDoubleMuon2016C.log
  • 136.902136.902_RunDoubleMuon2016H/step2_RunDoubleMuon2016H.log
Expand to see more relval errors ...

AddOn Tests

A fatal system signal has occurred: abort signal
A fatal system signal has occurred: abort signal
A fatal system signal has occurred: abort signal
Expand to see more addon errors ...

@smuzaffar
Copy link
Contributor Author

@cms-sw/ml-l2 , Looks like [VarProcessor::~VarProcessor()[(https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/MVAComputer/src/VarProcessor.cc#L42-L45) is explicitly calling inputVars = BitSet(0); . I do not think we need this call, the BitSet destructor should do the correct cleanup https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/MVAComputer/interface/BitSet.h#L150 .

Do you agree we can remove the following from the VarProcessor::~VarProcessor()

    inputVars = BitSet(0);
    nInputVars = 0;

@smuzaffar
Copy link
Contributor Author

@cms-sw/ml-l2 , what do you think about #46318 (comment) ?

@smuzaffar
Copy link
Contributor Author

please test

I have cleaned up ~VarProcessor

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #46318 was updated. @valsdav, @y19y19 can you please check and sign again.

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 20KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9a33d4/42121/summary.html
COMMIT: 37d6a21
CMSSW: CMSSW_14_2_X_2024-10-10-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46318/42121/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • Reco comparison results: 12 differences found in the comparisons
  • DQMHistoTests: Total files compared: 44
  • DQMHistoTests: Total histograms compared: 3331066
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3331037
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 43 files compared)
  • Checked 193 log files, 163 edm output root files, 44 DQM output files
  • TriggerResults: no differences found

@smuzaffar
Copy link
Contributor Author

@cms-sw/ml-l2 , can youplease review this PR?

@cmsbuild
Copy link
Contributor

Milestone for this pull request has been moved to CMSSW_15_0_X. Please open a backport if it should also go in to CMSSW_14_2_X.

@cmsbuild cmsbuild modified the milestones: CMSSW_14_2_X, CMSSW_15_0_X Nov 22, 2024
@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2025

Milestone for this pull request has been moved to CMSSW_15_1_X. Please open a backport if it should also go in to CMSSW_15_0_X.

@cmsbuild cmsbuild modified the milestones: CMSSW_15_0_X, CMSSW_15_1_X Feb 7, 2025
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.

2 participants