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

Parametrized magnetic field in alpaka #44360

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

lecriste
Copy link
Contributor

@lecriste lecriste commented Mar 8, 2024

PR description:

Preliminary PR to access the magnetic field approximation in alpaka.
No changes are expected in the output.

Triggered by last bullet in https://docs.google.com/presentation/d/1WVF6F0CHImtcGzj-Pnyvo6nEBkTJokDsJx1JyxwLtJo/edit#slide=id.g2c0e7808fad_23_360

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44360/39400

  • This PR adds an extra 20KB to repository

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

@jfernan2
Copy link
Contributor

jfernan2 commented Mar 8, 2024

assign heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44360/39401

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

New categories assigned: heterogeneous

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

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

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

It involves the following packages:

  • MagneticField/ParametrizedEngine (reconstruction)

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

@namapane
Copy link
Contributor

namapane commented Mar 8, 2024

I'd like to add a warning here. This class provides a fast, rough approximation that is intended to be used within the tracker region only. The nominal region of validity is defined here:

https://github.com/cms-sw/cmssw/blob/master/MagneticField/ParametrizedEngine/src/ParabolicParametrizedMagneticField.cc#L44

It is generally a bad idea to use this approximation outside this region.

Also, please note that the header is placed in src on purpose, because this class is not intended to be used directly by other packages - this is just part of the implementation of the plugin that the package implements.
The MF is a service, which is served depending on the conditions (magnet current). Hardcoding a piece of implementation elsewhere will break this dependence, and one may at some point have a very hard time to figure out that some piece of code is using the wrong field for, e.g., runs at B=0 or if we ever have to take data at reduced magnet currents.

I would really advise to use the MF in the way it is designed and used in the rest of CMSSW, and not to make some pieces available in the public interface of the package.

@makortel
Copy link
Contributor

makortel commented Mar 8, 2024

@namapane

served depending on the conditions (magnet current). Hardcoding a piece of implementation elsewhere will break this dependence, and one may at some point have a very hard time to figure out that some piece of code is using the wrong field for, e.g., runs at B=0 or if we ever have to take data at reduced magnet currents.

Just to make sure I've understood correctly, are all of the conditions effectively encoded in the four parameters (c1, b0, b2, a) of the ParabolicParametrizedMagneticField?

Would this concern be satisfied if the parameters would have to be obtained from the magnetic field object in the EventSetup?

I would really advise to use the MF in the way it is designed and used in the rest of CMSSW, and not to make some pieces available in the public interface of the package.

The challenge is that the existing magnetic field infrastructure is not usable in GPU, which is what I believe @lecriste et al would need to do (in one way or another).

@lecriste
Copy link
Contributor Author

lecriste commented Mar 8, 2024

The challenge is that the existing magnetic field infrastructure is not usable in GPU, which is what I believe @lecriste et al would need to do (in one way or another).

Right, and we verified that for the use-case of the e/gamma seeding, the parabolic approximation is suitable to be adopted at the ECAL boundary.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2024

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44360/39402

  • This PR adds an extra 20KB to repository

  • Found files with invalid states:

    • MagneticField/ParametrizedEngine/plugins/alpaka/ParabolicParametrizedMagneticField.h:

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

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44360/41361

@lecriste
Copy link
Contributor Author

Found files with invalid states:

  • MagneticField/ParametrizedEngine/plugins/alpaka/ParabolicParametrizedMagneticField.h:

@lecriste Would it be feasible to squash the commit history into one commit?

Done.

@cmsbuild
Copy link
Contributor

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

@makortel
Copy link
Contributor

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1b3cf3/40964/summary.html
COMMIT: 0828b85
CMSSW: CMSSW_14_1_X_2024-08-15-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/44360/40964/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 3 lines from the logs
  • Reco comparison results: 5 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3422510
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3422484
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 44 files compared)
  • Checked 196 log files, 165 edm output root files, 45 DQM output files
  • TriggerResults: no differences found

@fwyzard
Copy link
Contributor

fwyzard commented Aug 17, 2024

+heterogeneous

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 36c495e into cms-sw:master Aug 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.

9 participants