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

Fix some MkFit valgrind warnings, improve loop vectorization #43725

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

dan131riley
Copy link

PR description:

valgrind memcheck complains about uninitialised values in a few new places where we loop over NN. This PR quiets them, mostly by conditionals on N_proc and partly by initializing some MkFitter structures to 0.0f.

My working theory is that a loop over constant NN with an if on N_proc is more vectorizable than a loop over an unbounded N_proc, since the compiler can infer that N_proc <= NN, and use an N_proc mask to vectorize the loop. Therefore, this PR also switches some loop indices from N_proc to NN + a conditional on N_proc.

This PR also empties the pools of MkFitter/MkBuilder objects in the MkFit producer, to at least partially address #42700. Emptying the pool is thread-safe, so this should be safe when there are multiple instances of MkFit. tbb::concurrent_queue::clear() however is not thread safe, so calling it would require some kind of concurrency protection.

PR validation:

Validation with a standard TTBar PU55-75 showed no significant differences (validation was run multi-threaded, so small differences were not unexpected).

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 16, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43725/38426

  • This PR adds an extra 72KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @dan131riley (Dan Riley) for master.

It involves the following packages:

  • RecoTracker/MkFit (reconstruction)
  • RecoTracker/MkFitCore (reconstruction)

@jfernan2, @mandrenguyen, @cmsbuild can you please review it and eventually sign? Thanks.
@mtosi, @dgulhan, @rovere, @makortel, @missirol, @JanFSchulte, @gpetruc, @VourMa, @GiacomoSguazzoni, @felicepantaleo, @mmusich, @VinInn 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

@slava77
Copy link
Contributor

slava77 commented Jan 17, 2024

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1a095e/36874/summary.html
COMMIT: 306b663
CMSSW: CMSSW_14_0_X_2024-01-16-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43725/36874/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 72 lines to the logs
  • Reco comparison results: 6714 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3247526
  • DQMHistoTests: Total failures: 28005
  • DQMHistoTests: Total nulls: 4
  • DQMHistoTests: Total successes: 3219495
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • DQMHistoSizes: changed ( 140.023 ): 0.016 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 141.042 ): -0.012 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 141.044 ): -0.004 KiB JetMET/SUSYDQM
  • Checked 200 log files, 161 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

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

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 581f826 into cms-sw:master Jan 17, 2024
11 checks passed
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.

5 participants