Skip to content

Commit 3ddd89e

Browse files
authored
Add doc for scorep (#204)
1 parent b9fdab4 commit 3ddd89e

File tree

7 files changed

+152
-8
lines changed

7 files changed

+152
-8
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ docs/access/jupyterlab.md @rsarm
33
docs/services/firecrest @jpdorsch @ekouts
44
docs/software/communication @Madeeks @msimberg
55
docs/software/devtools/linaro @jgphpc
6+
docs/software/devtools/vihps @jgphpc
67
docs/software/prgenv/linalg.md @finkandreas @msimberg
78
docs/software/sciapps/cp2k.md @abussy @RMeli
89
docs/software/sciapps/lammps.md @nickjbrowning

.github/actions/spelling/allow.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,8 @@ xname
335335
xpmem
336336
youtube
337337
zstd
338+
HPS
339+
jobscript
340+
Scalasca
341+
tracefile
342+
Vampir
1.33 MB
Loading
329 KB
Loading

docs/software/devtools/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ This ensures that computational resources are utilized to their fullest potentia
2828
Learning to analyze the performance of an applications effectively is crucial to build a deeper understanding of how your code interacts with the underlying hardware.
2929
In this section we introduce the various performance analysis solutions available at CSCS.
3030

31-
* [Linaro Forge MAP][ref-devtools-map]
3231
* [NVIDIA Nsight Developer Tools][ref-devtools-nsight]
33-
32+
* [Linaro Forge MAP][ref-devtools-map]
33+
* [VI-HPS Tools][ref-devtools-vihps]

docs/software/devtools/vihps.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
[](){#ref-devtools-vihps}
2+
# VI-HPS tools
3+
4+
The [VI-HPS](https://www.vi-hps.org/tools) Institute (Virtual Institute for High Productivity Supercomputing) provides tools that can assist developers of simulation codes to address their needs in performance analysis.
5+
6+
## [Score-P](https://www.vi-hps.org/projects/score-p/overview/overview.html)
7+
8+
[Score-P](https://www.vi-hps.org/projects/score-p/overview/overview.html)
9+
is a highly scalable instrumentation and measurement infrastructure for profiling, event tracing, and online analysis. It supports a wide range of HPC platforms and programming models. Score-P provides core measurement services for a range of specialized analysis tools, such as Vampir, Scalasca and others.
10+
11+
## [Vampir](https://www.vi-hps.org/tools/vampir.html)
12+
13+
[Vampir](https://www.vi-hps.org/tools/vampir.html)
14+
is a performance visualizer that allows to quickly study the program runtime behavior at a fine level of details. This includes the display of detailed performance event recordings over time in timelines and aggregated profiles. Interactive navigation and zooming are the key features of the tool, which help to quickly identify inefficient or faulty parts of a program.
15+
16+
!!! info
17+
While Score-P does not require a license, [Vampir](https://vampir.eu/licensing) does. CSCS standard license allows to read trace files with up to 256 concurrent threads of execution.
18+
19+
The Vampir GUI is currently available only on `x86-64` CPU based systems and is not provided via a uenv (more details in the Quickstart guide below).
20+
You can use Score-P to generate OTF2 traces files on Alps compute nodes and then visualize the results with Vampir on a x86-64 CPU based system (for instance Eiger, LUMI or using your own license).
21+
22+
## [Cube and Scalasca](http://www.vi-hps.org/tools/scalasca.html)
23+
24+
[Cube and Scalasca](http://www.vi-hps.org/tools/scalasca.html)
25+
support the performance optimization of parallel programs with a collection of scalable trace-based tools for in-depth analyses of concurrent behavior. The analysis identifies potential performance bottlenecks - in particular those concerning communication and synchronization - and offers guidance in exploring their causes.
26+
27+
## Quickstart guide
28+
29+
The VI-HPS uenv is named `scorep` and it can be loaded into your environment as explained here and in the [uenv documentation][ref-uenv].
30+
31+
!!! example "Finding and pulling available `scorep` versions"
32+
33+
```console
34+
uenv image find scorep
35+
# uenv arch system id size(MB) date
36+
# scorep/9.2-gcc12:v1 gh200 daint bfd3b46d30404f2c 7,602 2025-07-14
37+
# scorep/9.2-gcc13:v1 gh200 daint 3c0357a490c81f32 7,642 2025-07-14
38+
39+
uenv image pull scorep/9.2-gcc13:v1
40+
# pulling 3c0357a490c81f32 100.00%
41+
```
42+
43+
This uenv is configured to be mounted in the `/user-environment` path.
44+
45+
!!! example "Start the `scorep` uenv"
46+
47+
```bash
48+
uenv start scorep/9.2-gcc13:v1 -v default
49+
50+
uenv status # (1)!
51+
scorep --version # 9.2
52+
scalasca --version # 2.6.2
53+
cubelib-config --version # 4.9
54+
otf2-print --version # 3.1.1
55+
56+
find /user-environment/ -name scorep.pdf # (2)!
57+
```
58+
59+
1. Test that everything has been mounted correctly and that the tools are in the PATH
60+
2. A PDF version of the user guide is available in the uenv.
61+
62+
!!! example "Recompile your code with `scorep` on Alps"
63+
64+
```bash
65+
# Building with CMake requires the following steps
66+
## Invoke cmake with the scorep wrapper disabled:
67+
SCOREP_WRAPPER=OFF \
68+
cmake -S src -B build \
69+
-DCMAKE_CXX_COMPILER=scorep-mpic++ \
70+
-DCMAKE_C_COMPILER=scorep-mpicc \
71+
-DCMAKE_CUDA_COMPILER=scorep-nvcc \
72+
-DCMAKE_CUDA_ARCHITECTURES=90 # [...]
73+
74+
## Then build with the scorep wrapper enabled:
75+
SCOREP_WRAPPER=ON \
76+
cmake --build build
77+
```
78+
79+
!!! example "Run your application with `scorep` on Alps"
80+
81+
Pick one of the report type in your jobscript before running the executable compiled with `scorep`:
82+
83+
=== "Profiling"
84+
85+
- Profiling gives an overview of the performance of your simulation on Alps
86+
87+
```bash
88+
export SCOREP_ENABLE_PROFILING=true
89+
# Call-path profiling: CUBE4 data format (profile.cubex)
90+
```
91+
92+
- Then run your job as usual with `srun` or `sbatch` on Alps,
93+
- Copy the generated profile `profile.cubex` to your laptop,
94+
- Install the [Cube](https://www.scalasca.org/scalasca/software) tool on your laptop,
95+
- Analyze the results with the GUI:
96+
- performance metric (left panel)
97+
- call path (middle panel)
98+
- system resource (right panel)
99+
100+
```bash
101+
/Applications/Cube/4.9/Cube.app/Contents/MacOS/maccubegui.sh \
102+
./profile.cubex
103+
```
104+
105+
![sphexa_cube](../../images/devtools/vihps/sphexa_cube.png){ width="90%"}
106+
107+
=== "Tracing"
108+
109+
- Tracing allows a detailed analysis of the performance of your simulation on Alps
110+
111+
```bash
112+
export SCOREP_ENABLE_TRACING=true
113+
# Event-based tracing: OTF2 data format (traces.otf2)
114+
```
115+
116+
- Then run your job as usual with `srun` or `sbatch` on Alps,
117+
- Analyze the results with the GUI:
118+
119+
```bash
120+
ssh -X eiger.cscs.ch # Vampir GUI requires x86_64 ⚠️
121+
/capstor/store/cscs/userlab/vampir/10.6.1/bin/vampir \
122+
./traces.otf2
123+
```
124+
125+
!!! info
126+
- Tracing allows more detailed analysis but will also make your simulation run longer than with profiling,
127+
- `scorep-score` allows to estimate the size of an OTF2 tracefile from a CUBE profile,
128+
it can also help to reduce the overhead of tracing via filtering:
129+
```bash
130+
scorep-score -g profile.cubex # generate filter file
131+
scorep-score -f initial_scorep.filter profile.cubex
132+
export SCOREP_FILTERING_FILE='initial_scorep.filter'
133+
```
134+
- The [user guide](https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-9.2/html/group__SCOREP__User.html#gaab4b3ccc2b169320c1d3bf7fe19165f9) provides more details about how to reduce overhead.
135+
136+
![sphexa_vampir](../../images/devtools/vihps/sphexa_vampir.png){ width="90%"}

mkdocs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,20 @@ nav:
7575
- 'uenv': build-install/uenv.md
7676
- 'Containers (podman)': build-install/containers.md
7777
- 'Python with pip': build-install/pip.md
78-
- 'Debugging and Performance Analysis':
79-
- software/devtools/index.md
80-
- 'Linaro uenv': software/devtools/linaro-uenv.md
81-
- 'Using Linaro performance analysis tool': software/devtools/linaro-map.md
82-
- 'Using Linaro debugger': software/devtools/linaro-ddt.md
83-
- 'NVIDIA Nsight': software/devtools/nvidia-nsight.md
8478
- 'uenv':
8579
- software/uenv/index.md
8680
- 'Configuration': software/uenv/configure.md
8781
- 'Building uenv': software/uenv/build.md
8882
- 'Deploying uenv': software/uenv/deploy.md
8983
- 'Release notes': software/uenv/release-notes.md
84+
- 'Debugging and Performance Analysis':
85+
- software/devtools/index.md
86+
- 'Using NVIDIA Nsight': software/devtools/nvidia-nsight.md
87+
- 'Using Linaro Forge':
88+
- software/devtools/linaro-uenv.md
89+
- 'Linaro performance analysis tool': software/devtools/linaro-map.md
90+
- 'Linaro debugger': software/devtools/linaro-ddt.md
91+
- 'Using Score-P/Scalasca': software/devtools/vihps.md
9092
- 'Container Engine':
9193
- software/container-engine/index.md
9294
- 'Using container engine': software/container-engine/run.md

0 commit comments

Comments
 (0)