Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ docs/access/jupyterlab.md @rsarm
docs/services/firecrest @jpdorsch @ekouts
docs/software/communication @Madeeks @msimberg
docs/software/devtools/linaro @jgphpc
docs/software/devtools/vihps @jgphpc
docs/software/prgenv/linalg.md @finkandreas @msimberg
docs/software/sciapps/cp2k.md @abussy @RMeli
docs/software/sciapps/lammps.md @nickjbrowning
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,8 @@ xname
xpmem
youtube
zstd
HPS
jobscript
Scalasca
tracefile
Vampir
Binary file added docs/images/devtools/vihps/sphexa_cube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/devtools/vihps/sphexa_vampir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/software/devtools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ This ensures that computational resources are utilized to their fullest potentia
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.
In this section we introduce the various performance analysis solutions available at CSCS.

* [Linaro Forge MAP][ref-devtools-map]
* [NVIDIA Nsight Developer Tools][ref-devtools-nsight]

* [Linaro Forge MAP][ref-devtools-map]
* [VI-HPS Tools][ref-devtools-vihps]
136 changes: 136 additions & 0 deletions docs/software/devtools/vihps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
[](){#ref-devtools-vihps}
# VI-HPS tools

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.

## [Score-P](https://www.vi-hps.org/projects/score-p/overview/overview.html)

[Score-P](https://www.vi-hps.org/projects/score-p/overview/overview.html)
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.

## [Vampir](https://www.vi-hps.org/tools/vampir.html)

[Vampir](https://www.vi-hps.org/tools/vampir.html)
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.

!!! info
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.

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).
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).

## [Cube and Scalasca](http://www.vi-hps.org/tools/scalasca.html)

[Cube and Scalasca](http://www.vi-hps.org/tools/scalasca.html)
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.

## Quickstart guide

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].

!!! example "Finding and pulling available `scorep` versions"

```console
uenv image find scorep
# uenv arch system id size(MB) date
# scorep/9.2-gcc12:v1 gh200 daint bfd3b46d30404f2c 7,602 2025-07-14
# scorep/9.2-gcc13:v1 gh200 daint 3c0357a490c81f32 7,642 2025-07-14

uenv image pull scorep/9.2-gcc13:v1
# pulling 3c0357a490c81f32 100.00%
```

This uenv is configured to be mounted in the `/user-environment` path.

!!! example "Start the `scorep` uenv"

```bash
uenv start scorep/9.2-gcc13:v1 -v default

uenv status # (1)!
scorep --version # 9.2
scalasca --version # 2.6.2
cubelib-config --version # 4.9
otf2-print --version # 3.1.1

find /user-environment/ -name scorep.pdf # (2)!
```

1. Test that everything has been mounted correctly and that the tools are in the PATH
2. A PDF version of the user guide is available in the uenv.

!!! example "Recompile your code with `scorep` on Alps"

```bash
# Building with CMake requires the following steps
## Invoke cmake with the scorep wrapper disabled:
SCOREP_WRAPPER=OFF \
cmake -S src -B build \
-DCMAKE_CXX_COMPILER=scorep-mpic++ \
-DCMAKE_C_COMPILER=scorep-mpicc \
-DCMAKE_CUDA_COMPILER=scorep-nvcc \
-DCMAKE_CUDA_ARCHITECTURES=90 # [...]

## Then build with the scorep wrapper enabled:
SCOREP_WRAPPER=ON \
cmake --build build
```

!!! example "Run your application with `scorep` on Alps"

Pick one of the report type in your jobscript before running the executable compiled with `scorep`:

=== "Profiling"

- Profiling gives an overview of the performance of your simulation on Alps

```bash
export SCOREP_ENABLE_PROFILING=true
# Call-path profiling: CUBE4 data format (profile.cubex)
```

- Then run your job as usual with `srun` or `sbatch` on Alps,
- Copy the generated profile `profile.cubex` to your laptop,
- Install the [Cube](https://www.scalasca.org/scalasca/software) tool on your laptop,
- Analyze the results with the GUI:
- performance metric (left panel)
- call path (middle panel)
- system resource (right panel)

```bash
/Applications/Cube/4.9/Cube.app/Contents/MacOS/maccubegui.sh \
./profile.cubex
```

![sphexa_cube](../../images/devtools/vihps/sphexa_cube.png){ width="90%"}

=== "Tracing"

- Tracing allows a detailed analysis of the performance of your simulation on Alps

```bash
export SCOREP_ENABLE_TRACING=true
# Event-based tracing: OTF2 data format (traces.otf2)
```

- Then run your job as usual with `srun` or `sbatch` on Alps,
- Analyze the results with the GUI:

```bash
ssh -X eiger.cscs.ch # Vampir GUI requires x86_64 ⚠️
/capstor/store/cscs/userlab/vampir/10.6.1/bin/vampir \
./traces.otf2
```

!!! info
- Tracing allows more detailed analysis but will also make your simulation run longer than with profiling,
- `scorep-score` allows to estimate the size of an OTF2 tracefile from a CUBE profile,
it can also help to reduce the overhead of tracing via filtering:
```bash
scorep-score -g profile.cubex # generate filter file
scorep-score -f initial_scorep.filter profile.cubex
export SCOREP_FILTERING_FILE='initial_scorep.filter'
```
- 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.

![sphexa_vampir](../../images/devtools/vihps/sphexa_vampir.png){ width="90%"}
14 changes: 8 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ nav:
- 'uenv': build-install/uenv.md
- 'Containers (podman)': build-install/containers.md
- 'Python with pip': build-install/pip.md
- 'Debugging and Performance Analysis':
- software/devtools/index.md
- 'Linaro uenv': software/devtools/linaro-uenv.md
- 'Using Linaro performance analysis tool': software/devtools/linaro-map.md
- 'Using Linaro debugger': software/devtools/linaro-ddt.md
- 'NVIDIA Nsight': software/devtools/nvidia-nsight.md
- 'uenv':
- software/uenv/index.md
- 'Configuration': software/uenv/configure.md
- 'Building uenv': software/uenv/build.md
- 'Deploying uenv': software/uenv/deploy.md
- 'Release notes': software/uenv/release-notes.md
- 'Debugging and Performance Analysis':
- software/devtools/index.md
- 'Using NVIDIA Nsight': software/devtools/nvidia-nsight.md
- 'Using Linaro Forge':
- software/devtools/linaro-uenv.md
- 'Linaro performance analysis tool': software/devtools/linaro-map.md
- 'Linaro debugger': software/devtools/linaro-ddt.md
- 'Using Score-P/Scalasca': software/devtools/vihps.md
- 'Container Engine':
- software/container-engine/index.md
- 'Using container engine': software/container-engine/run.md
Expand Down