Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:services:application_services:high_performance_computing:performance_engineering_and_analysis:score-p [2022/10/27 14:11] – created jogajaen:services:application_services:high_performance_computing:performance_engineering_and_analysis:score-p [2024/04/11 11:45] (current) jogaja
Line 1: Line 1:
 +==== Score-P ====
 +(Scalable Performance Measurement Infrustructure for Parallel codes)
 +Is a powerful tool suite for profiling and tracing events during execution of parallel applications.
 +
 +With its support for different data formats to instrument, write and read trace data, it supports a number of analyis tools including Vampir, Scalasca and TAU. Data formats supported by Score-P include, Open Trace format 2 - OTF2, Cube4 profilinf format and the Opari2 instrumenter.
 +
 +To compile a code with Score-P, you have to load the module first then use the Score-P wrapper.
 +
 +<code>
 +$ module load scorep
 +</code>
 +
 +In our system, loading the Score-P module also enables links to both OTF2 and CUBE libraries.
 +
 +For automatic instrumentation use the scorep wrapper before the compiler, for example
 +
 +<code>
 +$# Environment variable setup examples
 +
 +$ export SCOREP_ENABLE_TRACING=true
 +
 +$ scorep --user gcc -c test.c -o test
 +</code>
 +
 +For manual instrumentation the "--user" flag is added to the "scorep" command when compiling, i.e.
 +<code>
 +$ scorep --user gcc -o test test.c
 +</code>
 +
 +The environment variable "SCOREP_ENABLE_TRACING" allows tracing measurements. Current Score-P environment variables currently set can be checked by "score-p-info"
 +
 +<code>
 +$ scorep-info config-vars --full
 +
 +#Output
 +
 +SCOREP_ENABLE_PROFILING
 +Description: Enable profiling
 +      Type: Boolean
 +      Default: true
 +
 +SCOREP_ENABLE_TRACING
 +Description: Enable tracing
 +      Type: Boolean
 +      Default: false
 +
 +SCOREP_VERBOSE
 +Description: Be verbose
 +      Type: Boolean
 +      Default: false
 +
 + .....
 +</code>
 +
 +To produce tace and profile files, just run the executable.
 +**NOTE:** In SCC, unfortunately for libraries installed via Spack scorep module ought to be loaded at run-time for linking to the necessary data formats libraries, e.g. for an interactive mode...
 +<code>
 +
 +module load scorep
 +
 +# Then run the executable
 +$./test
 +</code>
 +
 +Following is an example run-script for batch execution:
 +
 +<code>
 +#!/bin/bash
 +#SBATCH --nodes=1
 +#SBATCH --partition=medium
 +#SBATCH --ntasks-per-node=16
 +#SBATCH --time=00:02:00
 +#SBATCH --job-name=vampir_trace_test
 +#SBATCH --output=traceTest_.%A_%a.out
 +#SBATCH --error=traceTest_e.%A_%a.err
 +
 +module load scorep
 +
 +export SCOREP_ENABLE_TRACING=true
 +
 +# run the executable
 +srun ./trace.bin <input1, input2,...> output
 +</code>