You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two way to set up LST as a standalone, either by setting up a full CMSSW area, which provides a unified setup for standalone and CMSSW tests, or by `sparse-checkout` only the relevant package and using them independent of CMSSW. A CVMFS-less setup is also provided for the second option.
19
+
20
+
### Setting up LST within CMSSW (preferred option)
21
+
22
+
```bash
23
+
CMSSW_VERSION=CMSSW_14_2_0_pre4 # Change with latest/preferred CMSSW version
24
+
cmsrel ${CMSSW_VERSION}
25
+
cd${CMSSW_VERSION}/src/
26
+
cmsenv
27
+
git cms-init
28
+
# If necessary, add the remote [email protected]:SegmentLinking/cmssw.git
# If modifying some dependencies, run `git cms-checkdeps -a -A`
32
+
scram b -j 12
33
+
cd RecoTracker/LSTCore/standalone
34
+
```
35
+
36
+
The data files for LST will be fetched from CVMFS. However, if new data files are needed, the need to be manually placed (under `$CMSSW_BASE/external/$SCRAM_ARCH/data/RecoTracker/LSTCore/data/`). This is done by running:
# python3 efficiency/python/lst_plot_performance.py LSTNumDen.root -t "myTag" # if you are on cgpu-1 or Cornell
74
+
lst_plot_performance.py LSTNumDen.root -t "myTag" # or
75
+
python3 efficiency/python/lst_plot_performance.py LSTNumDen.root -t "myTag" # if you are on cgpu-1 or Cornell
35
76
36
77
The above can be even simplified
37
78
38
-
sdl_run -f -mc -s PU200 -n -1 -t myTag
79
+
lst_run -f -m -s PU200 -n -1 -t myTag
39
80
40
81
The `-f` flag can be omitted when the code has already been compiled. If multiple backends were compiled, then the `-b` flag can be used to specify a backend. For example
41
82
42
-
sdl_run -b cpu -s PU200 -n -1 -t myTag
83
+
lst_run -b cpu -s PU200 -n -1 -t myTag
43
84
44
-
## Command explanations
85
+
###Command explanations
45
86
46
87
Compile the code with option flags. If none of `C,G,R,A` are used, then it defaults to compiling for CUDA and CPU.
47
88
48
-
sdl_make_tracklooper -mc
89
+
lst_make_tracklooper -m
49
90
-m: make clean binaries
50
-
-c: run with the cmssw caching allocator
51
91
-C: compile CPU backend
52
92
-G: compile CUDA backend
53
93
-R: compile ROCm backend
@@ -56,7 +96,7 @@ Compile the code with option flags. If none of `C,G,R,A` are used, then it defau
Follow the instructions in the ["Setting up LST within CMSSW" section](#setting-up-lst-within-cmssw-preferred-option).
193
154
194
-
For enabling the LST reconstruction in the CMSSW tracking workflow, a modified step3 needs to be run.
195
-
This is based on the step3 command of the 21034.1 workflow with the following changes:
196
-
- Remove the `--pileup_input` and `--pileup` flags.
197
-
- The number of threads and streams for the job can be optionally controlled by the `--nThreads` and `--nStreams` command line options respectively (`1` ends up being the actual default value for both, and more info can be found by running `cmsDriver.py --help`).
198
-
- Add at the end of the command: `--procModifiers gpu,trackingLST,trackingIters01 --no_exec`
199
-
200
-
Run the command and modify the output configuration file with the following:
201
-
- If want to run a cpu version, remove the ```gpu``` in the line defining the `process` object:
202
-
```python
203
-
process = cms.Process('RECO',...,gpu,...)
204
-
```
205
-
- Add the following lines below the part where the import of the standard configurations happens:
Comparison plots can be made by including multiple ROOT files as arguments.
157
+
Two complete workflows have been implemented within CMSSW to run a two-iteration, tracking-only reconstruction with LST:
158
+
- 24834.703 (CPU)
159
+
- 24834.704 (GPU)
225
160
226
-
**Note:** In case one wants to run step2 as well, similar modifications as in step4 (`--no_exec` flag and input file/number of events) need to be applied. Moreover, the PU files have better be modified to point to local ones. This can be done by inserting a dummy file when running the command (set the argument of the `--pileup_input` flag to `file:file.root`), and then change the PU input files in the configuration to the following line (by means of replacing the corresponding line in the configuration):
We will use the second one in the example below. To get the commands of this workflow, one can run:
230
162
231
-
### Inclusion of LST in other CMSSW packages
232
-
Including the line
233
-
```
234
-
<use name="lst"/>
235
-
```
236
-
in the relevant package `BuildFile.xml` allows for
237
-
including our headers in the code of that package.
163
+
runTheMatrix.py -w upgrade -n -e -l 24834.704
238
164
239
-
## Running LST in a CVMFS-less setup
165
+
For convenience, the workflow has been run for 100 events and the output is stored here:
240
166
241
-
The setup scripts included in this repository assume that the [CernVM File System (CVMFS)](https://cernvm.cern.ch/fs/) is installed. This provides a convenient way to fetch the required dependencies, but it is not necessary to run LST in standalone mode. Here, we briefly describe how to build and run it when CVMFS is not available.
The necessary dependencies are CUDA, ROOT, the Boost libraries, Alpaka, and some CMSSW headers. CUDA, ROOT, and Boost, are fairly standard libraries and are available from multiple package managers. For the remaining necessary headers you will need to clone the [Alpaka](https://github.com/alpaka-group/alpaka) and [CMSSW](https://github.com/cms-sw/cmssw) repositories. The Alpaka repository is reasonably sized, but the CMSSW one extremely large, especially considering that we only need a tiny fraction of its files to build LST. We can get only the Alpaka interface headers from CMSSW by running the following commands.
169
+
The input files in each step may need to be properly adjusted to match the ones produced by the previous step/provided externally, hence it is better to run the commands with the `--no_exec` option included.
# After this, you can compile and run LST as usual.
278
-
sdl_run -f -mc -s PU200 -n -1 -t myTag
279
-
```
177
+
Comparison plots can be made by including multiple ROOT files as arguments.
280
178
281
179
## Code formatting and checking
282
180
283
-
The makefile in the `SDL` directory includes phony targets to run `clang-format` and `clang-tidy` on the code using the formatting and checks used in CMSSW. The following are the available commands.
181
+
Using the first setup option above, it is prefered to run the checks provided by CMSSW using the following commands.
284
182
285
-
-`make format`
286
-
Formats the code in the `SDL` directory using `clang-format` following the rules specified in `.clang-format`.
287
-
-`make check`
288
-
Runs `clang-tidy` on the code in the `SDL` directory to performs the checks specified in `.clang-tidy`.
289
-
-`make check-fix`
290
-
Same as `make check`, but fixes the issues that it knows how to fix.
291
-
183
+
```
184
+
scram b -j 12 code-checks >& c.log && scram b -j 12 code-format >& f.log
0 commit comments