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

Resolved uninitialized value warning in PixelTrackFitting #33881

Merged

Conversation

ericcano
Copy link
Contributor

PR description:

This resolves the warning:

Eigen/src/Core/functors/AssignmentFunctors.h:92:62: warning: '*((void*)& p3D +88)' is used uninitialized in this function [-Wuninitialized]
   92 |   EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a *= b; }
      |                                                            ~~^~~~

The last row of the matrix is not initialized yet, and gets initialized right after.

PR validation:

The fix is limited and well understood. scram b runtests succeeds except for 5x5 matrices in testEigenGPUNoFit_t, and this problem is already followed up in #33797.

…Fitting.

This resolves the warning:
Eigen/src/Core/functors/AssignmentFunctors.h:92:62: warning: '*((void*)& p3D +88)' is used uninitialized in this function [-Wuninitialized]
   92 |   EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a *= b; }
      |                                                            ~~^~~~

The last row of the matrix is not initialized yet, and gets initialized right after.
@ericcano
Copy link
Contributor Author

@rovere could you double check?

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33881/22917

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ericcano (Eric Cano) for master.

It involves the following packages:

RecoPixelVertexing/PixelTrackFitting

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @mtosi, @dgulhan this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@VinInn
Copy link
Contributor

VinInn commented May 29, 2021

enable gpu

@VinInn
Copy link
Contributor

VinInn commented May 29, 2021

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a4563d/15414/summary.html
COMMIT: b23ba5a
CMSSW: CMSSW_12_0_X_2021-05-28-2300/slc7_amd64_gcc900
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/33881/15414/install.sh to create a dev area with all the needed externals and cmssw changes.

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 4
  • DQMHistoTests: Total histograms compared: 9533
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 9533
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 3 files compared)
  • Checked 12 log files, 9 edm output root files, 4 DQM output files
  • TriggerResults: no differences found

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2650486
  • DQMHistoTests: Total failures: 13
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2650451
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 36 files compared)
  • Checked 155 log files, 37 edm output root files, 37 DQM output files
  • TriggerResults: no differences found

@rovere
Copy link
Contributor

rovere commented May 31, 2021

Ciao @ericcano
seems ok to me, thanks for following this up.

@@ -515,7 +515,7 @@ namespace riemannFit {
// scale
const double tempQ = mc.squaredNorm();
const double tempS = sqrt(n * 1. / tempQ); // scaling factor
p3D *= tempS;
p3D.block(0, 0, 2, n) *= tempS;
Copy link
Contributor

Choose a reason for hiding this comment

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

was the older code running, BTW?
If I understood the warning correctly, was there supposed to be a crash here before this fix?

Copy link
Contributor Author

@ericcano ericcano May 31, 2021

Choose a reason for hiding this comment

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

Older code was running fine.
It was not supposed to crash. We simply scaled uninitialized values in place in the last row of the matrix just to overwrite them on the next statement. It was totally harmless (besides wasting n multiplications, and being the last compilation warning to clear).

@jpata
Copy link
Contributor

jpata commented Jun 1, 2021

+reconstruction

  • by the description, it looks technical
  • no changes in tests, none expected, as I understand, RiemannFit.h is not included in any (automatic) test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2021

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

@qliphy
Copy link
Contributor

qliphy commented Jun 2, 2021

+1

@cmsbuild cmsbuild merged commit d03fb6a into cms-sw:master Jun 2, 2021
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.

7 participants