Skip to content

Instantly share code, notes, and snippets.

@nothingface0
Last active February 6, 2023 11:18
Show Gist options
  • Save nothingface0/76d34262e47a29b5eb4d46443d8cf42e to your computer and use it in GitHub Desktop.
Save nothingface0/76d34262e47a29b5eb4d46443d8cf42e to your computer and use it in GitHub Desktop.
PixelTracksAlpaka CMSSW Fork setup

PixelTracksAlpaka CMSSW Fork setup

❗ This guide will become obsolete very soon!

Introduction

During the 11th Patatrack Hackathon, the PixelTracksAlpaka CMSSW fork was created in order to pool the changes towards the final porting of Pixel-local GPU reconstruction from CUDA to Alpaka.

As of writing, the fork is based on CMSSW_12_6_X_2022-11-28-2300.

There are currently two separate efforts:

  • Porting the Digis, Clusters and RecHits formats to Eric's SoA. PR here.
  • Porting the Tracks and TrajectoryState formats to Eric's SoA. PR here.

A presentation of the SoA Templates used can be found here.

Prerequisites

  • A CMS online account. This is different to an LXPLUS account. See here for instructions.

Setup

Clone the appropriate CMSSW version

  • Login to a CMS Online machine (instructions here). From within an LXPLUS machine:
    • ssh -f -N -D18080 cmsusr.cern.ch
      ssh -o ProxyCommand='nc --proxy localhost:18080 --proxy-type socks5 %h %p' gpu-c2a02-39-01.cms
    • You can change gpu-c2a02-39-01.cms to any other machine found in the list of the document linked above.
  • Setup your machine:
    • export SCRAM_ARCH=el8_amd64_gcc10
      source /cvmfs/cms.cern.ch/cmsset_default.sh
      export VO_CMS_SW_DIR=/cvmfs/cms.cern.ch/
  • Configure GitHub access: instructions here.
  • Clone CMSSW:
    • cmsrel CMSSW_12_6_X_2022-11-28-2300
      cd CMSSW_12_6_X_2022-11-28-2300/src
      cmsenv
      git cms-init
  • Verify this can be built without errors:
    • scram b -j 8

Pulling changes from a PixelTracksAlpaka PR

  • Choose an open PR, e.g.: PixelTracksAlpaka/cmssw#2
  • On your CMS online machine:
    • Checkout the required packages for the specific PR:
      git cms-addpkg CUDADataFormats/SiPixelCluster CUDADataFormats/SiPixelDigi CUDADataFormats/TrackingRecHit DataFormats/Portable EventFilter/SiPixelRawToDigi HeterogeneousCore/CUDAServices HeterogeneousCore/CUDAUtilities RecoLocalTracker/SiPixelClusterizer RecoLocalTracker/SiPixelRecHits
      git cms-checkdeps -a -A
    • Pull the changes:
      cd CMSSW_12_6_X_2022-11-28-2300/src
      cmsenv
      git apply https://github.com/PixelTracksAlpaka/cmssw/pull/2.patch  # We simply add ".patch" at the end of the URL

Validation

Once changes have been made to the source code and the code compiles succesfully, you can validate its outputs by running an appropriate workflow:

  • Run runTheMatrix.py:
    runTheMatrix.py -w upgrade -l 11634.502 -t 8
  • Change the generated cmdLog file for GENSIM step to have 100 files for validation.
  • Execute:
    . cmdLog
  • Run the validation:
    harvestTrackValidationPlots.py step3_inDQM*.root -o file.root
    makeTrackValidationPlots.py file.root

Contributing to the PixelTracksAlpaka fork

  • Create a cmssw fork to your personal GitHub account. You could also create a PixelTracksAlpaka fork.
  • On your CMS online machine:
    • git remote remove my-csmssw
      git remote add my-cmssw https://github.com/<your-github-username>/cmssw.git  # If using git over HTTPS
      git fetch my-cmssw
  • You can now push to any branch you create on your personal fork. Once a branch is created, you can make a PR to the PixelTracksAlpaka/cmssw fork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment