Skip to content

Conversation

@alexstrel
Copy link
Contributor

@alexstrel alexstrel commented Aug 12, 2025

PR description:

This PR adopts ParabolicParametrizedMagneticField.h parameter structure and helper functions for Alpaka implementations. Will be used in Alpaka electron seeding code. Unit test is modified to take into account the proposed changes.
resolves cms-sw/framework-team#1517 (comment)

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 12, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48729/45780

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • MagneticField/ParametrizedEngine (reconstruction)

@cmsbuild, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks.
@namapane 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

@makortel
Copy link
Contributor

assign heterogeneous

@cmsbuild
Copy link
Contributor

New categories assigned: heterogeneous

@fwyzard,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

#ifndef MagneticField_ParametrizedEngine_interface_ParabolicParametrizedMagneticField_h
#define MagneticField_ParametrizedEngine_interface_ParabolicParametrizedMagneticField_h

#include <Eigen/Core>
Copy link
Contributor

Choose a reason for hiding this comment

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

This #include should not be needed, because this header does not directly depend on Eigen.

Suggested change
#include <Eigen/Core>

template <typename Vec3>
constexpr float Kr(Vec3 const& vec) {
return Parameters::a * (vec(0) * vec(0) + vec(1) * vec(1)) + 1.f;
return Parameters::a * (vec[0] * vec[0] + vec[1] * vec[1]) + 1.f;
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the operator[] works also with Eigen::Matrix<float, 3, 1> (that the unit test uses). Arguably for 1D vector the operator[] is more general as works e.g. with C-array and std::array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, that is more generic form.

Comment on lines 23 to 24
template <typename TAcc, typename T>
ALPAKA_FN_ACC void operator()(TAcc const& acc, T const* __restrict__ in, T* __restrict__ out, size_t size) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please keep this as

Suggested change
template <typename TAcc, typename T>
ALPAKA_FN_ACC void operator()(TAcc const& acc, T const* __restrict__ in, T* __restrict__ out, size_t size) const {
template <typename T>
ALPAKA_FN_ACC void operator()(Acc1D const& acc, T const* __restrict__ in, T* __restrict__ out, size_t size) const {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


float resolution = 0.2;
const float resolution = 0.2;
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment-only line needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 16 to 17
// Hard-wired numbers defining the surfaces on which the crystal front faces lie

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder where this line originates from. Maybe an earlier version of #44360? I'd remove these two lines from this PR (unless there is a strong reason to keep)

Suggested change
// Hard-wired numbers defining the surfaces on which the crystal front faces lie

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an artifact from Charis's code, removed

@makortel
Copy link
Contributor

enable gpu

@makortel
Copy link
Contributor

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2582bf/47724/summary.html
COMMIT: 794cba5
CMSSW: CMSSW_15_1_X_2025-08-13-1100/el8_amd64_gcc12
Additional Tests: CUDA,ROCM
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/48729/47724/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: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 4076152
  • DQMHistoTests: Total failures: 40
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4076092
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 215 log files, 184 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

CUDA Comparison Summary

Summary:

ROCM Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 7
  • DQMHistoTests: Total histograms compared: 53444
  • DQMHistoTests: Total failures: 7212
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 46232
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 6 files compared)
  • Checked 24 log files, 30 edm output root files, 7 DQM output files
  • TriggerResults: no differences found

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48729/46810

  • Found files with invalid states:

@cmsbuild
Copy link
Contributor

Pull request #48729 was updated. @cmsbuild, @fwyzard, @jfernan2, @makortel, @mandrenguyen, @srimanob can you please check and sign again.

@makortel
Copy link
Contributor

@cmsbuild, please test

@fwyzard
Copy link
Contributor

fwyzard commented Nov 13, 2025

Thanks @alexstrel.

Last request, could you squash all commits into one ?
If it doesn't introduce any changes, it will not require re-signatures.

@fwyzard
Copy link
Contributor

fwyzard commented Nov 13, 2025

+heterogeneous

@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-2582bf/49441/summary.html
COMMIT: 7397771
CMSSW: CMSSW_16_0_X_2025-11-13-1100/el8_amd64_gcc13
Additional Tests: GPU,AMD_MI300X,AMD_W7900,NVIDIA_H100,NVIDIA_L40S,NVIDIA_T4
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/48729/49441/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
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 0 differences found in the comparisons
  • Reco comparison had 2 failed jobs
  • DQMHistoTests: Total files compared: 51
  • DQMHistoTests: Total histograms compared: 3880468
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3880443
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
  • Checked 218 log files, 188 edm output root files, 51 DQM output files
  • TriggerResults: no differences found

AMD_MI300X Comparison Summary

Summary:

  • You potentially added 4 lines to the logs
  • Reco comparison results: 209 differences found in the comparisons
  • Reco comparison had 6 failed jobs
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 148553
  • DQMHistoTests: Total failures: 33762
  • DQMHistoTests: Total nulls: 5
  • DQMHistoTests: Total successes: 114786
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: no differences found

AMD_W7900 Comparison Summary

Summary:

  • You potentially removed 8 lines from the logs
  • Reco comparison results: 247 differences found in the comparisons
  • Reco comparison had 6 failed jobs
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 148553
  • DQMHistoTests: Total failures: 27909
  • DQMHistoTests: Total nulls: 4
  • DQMHistoTests: Total successes: 120640
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 1 / 10 workflows

NVIDIA_H100 Comparison Summary

Summary:

  • You potentially added 6 lines to the logs
  • Reco comparison results: 233 differences found in the comparisons
  • Reco comparison had 6 failed jobs
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 148553
  • DQMHistoTests: Total failures: 26801
  • DQMHistoTests: Total nulls: 5
  • DQMHistoTests: Total successes: 121747
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 3 / 10 workflows

NVIDIA_L40S Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 240 differences found in the comparisons
  • Reco comparison had 6 failed jobs
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 148553
  • DQMHistoTests: Total failures: 27741
  • DQMHistoTests: Total nulls: 4
  • DQMHistoTests: Total successes: 120808
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: no differences found

NVIDIA_T4 Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 232 differences found in the comparisons
  • Reco comparison had 6 failed jobs
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 148553
  • DQMHistoTests: Total failures: 23827
  • DQMHistoTests: Total nulls: 6
  • DQMHistoTests: Total successes: 124720
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 2 / 10 workflows

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 9a48d57 into cms-sw:master Nov 13, 2025
25 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.

Polish magnetic field changes

7 participants