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

CMSSW Integration of LST #45117

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

Conversation

VourMa
Copy link
Contributor

@VourMa VourMa commented Jun 1, 2024

This PR integrates the LST algorithm in CMSSW. A summary of the algorithm and its scope can be found in the recent LST presentation at the Phase 2 Software days (April 2024).

The PR includes the following additions/modifications:

  • New package w/ the LST algorithm code (RecoTracker/LSTCore):
    • interface/alpaka:
      The interface exposed to CMSSW.
    • src/alpaka:
      The actual LST code.
    • standalone:
      Scripts to be used for compiling, using & testing LST outside of the full CMSSW framework.
      Not relevant for CMSSW review.
    • Minimal/at most header-only dependency of LSTCore on other CMSSW packages
      ⇒ Preserve ability to run in standalone.
  • New package w/ CMSSW modules related to LST (RecoTracker/LST):
    • interface:
      The input & output data formats for LST.
    • plugins:
      The producers:
      • Converting to/from the LST data formats (ED).
      • Loading the LST custom geometry files (ES).
      • Running LST to produce CMSSW collections (ED).
    • python:
      The configuration files needed for running LST.
    • src:
      Class definitions and ES producer supporting files.
    • test:
      Scripts for local testing
      → Dropped in favor of a proper workflow.
  • New process modifiers to test LST (changes in multiple existing packages):
    • trackingIters01:
      Runs only the first two iterations of tracking (initialStep & highPtTripletStep).
      Useful for comparisons, as LST (for now) replaces only those two tracking iterations.
    • trackingLST:
      Runs the LST algorithm instead of KalmanFilter for track building/seeding.
      The existence of the gpu process modifier defines the hardware the algorithm runs on (CPU or GPU).

There is a single change not strictly related to the above categories and a dedicated comment will be made on it.

In general, we prefer to have minimal or at most header-only dependency of LSTCore on other CMSSW packages to preserve the ability to run with standalone scripts.

This is a large PR, so we start it as an RFC with the main batch of files. In the next days, the following updates are to be expected, so that the PR can be merged:

  • Removal of test scripts and introduction of workflow.
  • Extraction of the LST data files from the proper directories (bot tests will probably not work currently).
  • Modifications to the standalone scripts → Not to be reviewed.

Goes together with cms-data/RecoTracker-LSTCore#1 (now merged).

@slava77 @ariostas


List of unresolved comments (to be updated in batches - last update: 2024/08/19):
SegmentLinking#75

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45117/40456

  • This PR adds an extra 788KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2024

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

It involves the following packages:

  • Configuration/ProcessModifiers (operations)
  • RecoTracker/ConversionSeedGenerators (reconstruction)
  • RecoTracker/FinalTrackSelectors (reconstruction)
  • RecoTracker/IterativeTracking (reconstruction)
  • RecoTracker/LST (****)
  • RecoTracker/LSTCore (reconstruction)

The following packages do not have a category, yet:

RecoTracker/LST
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories_map.py to assign category

@cmsbuild, @rappoccio, @jfernan2, @davidlange6, @mandrenguyen, @fabiocos, @antoniovilela can you please review it and eventually sign? Thanks.
@VourMa, @missirol, @gpetruc, @rovere, @GiacomoSguazzoni, @VinInn, @Martin-Grunewald, @mmusich, @mtosi, @dgulhan, @JanFSchulte, @fabiocos, @felicepantaleo, @makortel this is something you requested to watch as well.
@rappoccio, @sextonkennedy, @antoniovilela you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Jun 1, 2024

test parameters:

@slava77
Copy link
Contributor

slava77 commented Jun 1, 2024

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2024

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-252c14/39661/summary.html
COMMIT: 891eb11
CMSSW: CMSSW_14_1_X_2024-06-01-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45117/39661/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 2 errors in the following unit tests:

---> test TestDQMOnlineClient-hlt_dqm_sourceclient had ERRORS
---> test testTrackingResolution had ERRORS

Comparison Summary

Summary:

  • You potentially added 16 lines to the logs
  • Reco comparison results: 10 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3445370
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3445344
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 206 log files, 170 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@slava77
Copy link
Contributor

slava77 commented Jun 2, 2024

I found 2 errors in the following unit tests:

both are apparently related to LST
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-252c14/39661/unitTests/failed.html

@slava77
Copy link
Contributor

slava77 commented Jun 3, 2024

I found 2 errors in the following unit tests:

both are apparently related to LST https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-252c14/39661/unitTests/failed.html

An exception of category 'PluginNotFound' occurred while
   [0] Constructing the EventProcessor
Exception Message:
Unable to find plugin 'LSTModulesDevESProducer@alpaka' in category 'CMS EDM Framework ESModule'. Please check spelling of name.

it's not obvious how this dependency comes about from looking at https://github.com/cms-sw/cmssw/blob/master/DQM/TrackingMonitorSource/test/testTrackResolution_cfg.py (a Run3 test)

@makortel
do you see a clear way how the LST ES dependency makes it through here?

@mmusich
Copy link
Contributor

mmusich commented Jun 3, 2024

assign heterogeneous

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 3, 2024

New categories assigned: heterogeneous

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

ariostas and others added 4 commits October 28, 2024 11:37
continuing migration to SoA: update LS, migrate ranges, hits, endcap, modules
…STCore_realfiles_batch7

migrate to SoATemplate
@cmsbuild
Copy link
Contributor

This PR contains many commits (182 >= 150) and will not be processed. Please ensure you have selected the correct target branch and consider squashing unnecessary commits.
@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar, to re-enable processing of this PR, you can write +commit-count in a comment. Thanks.

@slava77
Copy link
Contributor

slava77 commented Oct 29, 2024

batch7 (merged) includes migration to SoATemplate and PortableCollection

  • 8338254 migrate TrackCandidate
  • fc3fc6a Migrate MDs
  • cb84b9c Migrate segments
  • ccc4bf4 upd TC, migrate T3s, T5s, pT3s and pT5s
  • f8e7884 update LS, migrate ranges, hits, endcap, modules

while that was prepared a few conflicts with CMSSW have accumulated, we'll be updating the topic branch to 14_2_0_pre3 imminently to cleanup the conflicts

@slava77
Copy link
Contributor

slava77 commented Oct 29, 2024

This PR contains many commits (182 >= 150) and will not be processed. Please ensure you have selected the correct target branch and consider squashing unnecessary commits. @Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar, to re-enable processing of this PR, you can write +commit-count in a comment. Thanks.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar
This is a large feature change coming from a few years of developments. The review had a few cycles and we have just added a 7th batch of responses to the comments.
While the final PR may have a squash towards merging, it would be more practical to keep track of the already present commits in responses to the review comments.

Please +commit-count to allow/facilitate further progress with this PR.

@fwyzard
Copy link
Contributor

fwyzard commented Oct 29, 2024

Please +commit-count to allow/facilitate further progress with this PR.

Ehm, what does it mean ?

@slava77
Copy link
Contributor

slava77 commented Oct 29, 2024

Please +commit-count to allow/facilitate further progress with this PR.

Ehm, what does it mean ?

IIUC, this is a command needed to bypass the number of commits check in the bot, which otherwise would not run any tests on a PR with more than 150 commits

@cmsbuild
Copy link
Contributor

This PR contains many commits (183 >= 150) and will not be processed. Please ensure you have selected the correct target branch and consider squashing unnecessary commits.
@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar, to re-enable processing of this PR, you can write +commit-count in a comment. Thanks.

@slava77
Copy link
Contributor

slava77 commented Oct 29, 2024

@cmsbuild please test

@smuzaffar
Copy link
Contributor

+commit-count

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45117/42417

@cmsbuild
Copy link
Contributor

@smuzaffar
Copy link
Contributor

Please +commit-count to allow/facilitate further progress with this PR.

Ehm, what does it mean ?

@fwyzard , to not waste bot resources ( github api calls/commit) bot disable processing the PR if it contains over 150 commits ( this mostly happens when someone opens a PR using wrong branch). +commit-count allow bot to process such PRs.

@slava77 , note that PR with over 240 commits will not be processed. For such PR one should open multiple PRs

@cmsbuild
Copy link
Contributor

-1

Failed Tests: HeaderConsistency RelVals-INPUT
Size: This PR adds an extra 52KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-252c14/42451/summary.html
COMMIT: 4d603ca
CMSSW: CMSSW_14_2_X_2024-10-29-1100/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45117/42451/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

RelVals-INPUT

  • 2023.1010012023.101001_RunDisplacedJet2023D_10k/step1_dasquery.log
  • 2024.0000012024.000001_RunJetMET02024D_10k/step1_dasquery.log
  • 2024.0010012024.001001_RunZeroBias2024D_10k/step1_dasquery.log
Expand to see more relval errors ...

Comparison Summary

Summary:

GPU 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: 53031
  • DQMHistoTests: Total failures: 53
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 52978
  • 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


namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {

using namespace ::lst;
Copy link
Contributor

Choose a reason for hiding this comment

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

this triggers a code-rule violation

Rule1 : https://raw.githubusercontent.com/cms-sw/cmssw/master/Utilities/ReleaseScripts/python/cmsCodeRules/config.py
Search for "using namespace" or "using std::" in header files

/RecoTracker/LSTCore/interface/alpaka/Constants.h
[8]

This was suggested to be used during the review in #45117 (comment)
for RecoTracker/LSTCore/src/alpaka/Event.h

Do I understand correctly that the rule is not triggered for header files in src/?

@fwyzard
What should we do?

  • leave as false-positive/acceptable
  • move this expression to src/

Please advise.

Copy link
Contributor

Choose a reason for hiding this comment

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

The false positive can be accepted. This line doesn't really violate any code rule (as the using namespace doesn't impact the global namespace), but haven't gotten to improve the checker yet. See also #40322.

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.