Difference between revisions of "Score-P"

From HPC Wiki
Jump to navigation Jump to search
(Tweak wording and improve inter-page linkeage)
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
[[Category:HPC-Developer]]
 
Score-P is a performance measurement infrastructure for profiling, event tracing and online analysis of (parallel) HPC applications.
 
Score-P is a performance measurement infrastructure for profiling, event tracing and online analysis of (parallel) HPC applications.
 +
It allows users to instrument and record the behavior of sequential, multi-process ([[MPI]], [[SHMEM]]), thread-parallel ([[OpenMP]], [[Pthreads]]) and accelerator-based ([[CUDA]], [[OpenCL]]) applications as well as hybrid parallel applications.
  
 
== General ==
 
== General ==
Line 6: Line 8:
  
 
* Periscope
 
* Periscope
* Scalasca
+
* [[Scalasca]]
 
* [[Vampir]]
 
* [[Vampir]]
* Tau
+
* [[TAU]]
  
It comes with the new Open Trace Format Version 2, the Cube4 profiling format and the Opari2 instrumenter and is available under the New BSD Open Source license.
+
It uses the [[OTF2|Open Trace Format Version 2]] for event traces and the [[Cube|Cube4]] profiling format for runtime summaries.
 +
[[OpenMP]] instrumentation is supported through the [[Opari2]] instrumenter.
 +
Score-P is available under the New BSD Open Source license.
 +
 
 +
== Instrumentation ==
 +
 
 +
Performing automatic instrumentation can simply be done by replacing your compiler command with the appropriate Score-P wrapper.
 +
The following example assumes your C compiler is given by the variable $CC:
 +
<syntaxhighlight lang="bash">
 +
$ scorep $CC <compile_flags>
 +
</syntaxhighlight>
 +
Score-P also supports MPI applications. Again the corresponding MPI-compiler-wrapper for Score-P needs to be used to ensure correct linking of the MPI libraries. Assuming the MPI C compiler is referenced by the variable $MPICC this looks like:
 +
<syntaxhighlight lang="bash">
 +
$ scorep $MPICC <compile_flags>
 +
</syntaxhighlight>
 +
 
 +
== Measurement ==
 +
 
 +
After compiling an instrumented binary it can just be executed and will generate measurement data during its execution.
 +
 
 +
Score-P offers several environment variables to control the behavior of the measurement facility within the binary. Some useful environment variables include:
 +
* $SCOREP_ENABLE_PROFILING - enable profiling
 +
* $SCOREP_ENABLE_TRACING - enable tracing
 +
* $SCOREP_TOTAL_MEMORY - total memory in bytes for the measurement system
 +
* $SCOREP_EXPERIMENT_DIRECTORY - name of the experiment directory
 +
* $SCOREP_FILTERING_FILE - a file name which contain the filter rules
 +
* $SCOREP_METRIC_PAPI - PAPI metric names to measure
 +
* $SCOREP_METRIC_RUSAGE - resource usage metric names to measure
 +
Note that tracing is disabled by default because it can cause substantial additional overhead and may produce lots of data, which will ultimately perturb your application runtime behavior during measurement.
 +
More environment variables can be found in the [http://scorepci.pages.jsc.fz-juelich.de/scorep-pipelines/docs/scorep-6.0/pdf/scorep.pdf Score-P documentation] (Appendix G - Score-P Measurement Configuration) or using the command:
 +
<syntaxhighlight lang="bash">
 +
$ scorep-info config-vars --full
 +
</syntaxhighlight>
 +
 
 +
== Analysis ==
 +
 
 +
Score-P produces experiment results in different commonly used formats.
 +
 
 +
Call-path profiles are stored in the [[Cube|CUBE4]] format and can be viewed using the [https://www.scalasca.org/scalasca/software/cube-4.x/download.html Cube] tool.
 +
 
 +
Event traces are stored in the [https://silc.zih.tu-dresden.de/otf2-current/html/index.html Open Trace Format 2] and can be visualized using tools such as [https://vampir.eu/ Vampir] or automatically analyzed with tools such as [https://www.scalasca.org/ Scalasca].
  
 
== Score-P Plugins ==  
 
== Score-P Plugins ==  
  
 
Score-P provides two plugin interfaces: metrics, which allows integrating new metric sources, and substrates, which allows adding new event consumers besides profiling and tracing. You can also write your own plugins.  
 
Score-P provides two plugin interfaces: metrics, which allows integrating new metric sources, and substrates, which allows adding new event consumers besides profiling and tracing. You can also write your own plugins.  
 +
 +
== Site specific notes ==
 +
=== RWTH ===
 +
In order to use Score-P on the RWTH cluster you need to load the corresponding module.
 +
Performance measurement tools are part of the ''DEV-TOOLS'' module group.
 +
This group can be loaded using the following command:
 +
<syntaxhighlight lang="sh">
 +
$ module load DEV-TOOLS
 +
</syntaxhighlight>
 +
To load the Score-P tool just type and enter:
 +
<syntaxhighlight lang="sh">
 +
$ module load scorep
 +
</syntaxhighlight>
 +
Depending on your currently loaded compiler and MPI implementation this will automatically load the correct version of Score-P for you.
 +
However, if you want to have an overview about all the available Score-P versions use the following command:
 +
<syntaxhighlight lang="sh">
 +
$ module avail scorep
 +
</syntaxhighlight>
 +
 +
=== TU Dresden ===
 +
In order to use Score-P on the Taurus cluster you need to load the corresponding module.
 +
<syntaxhighlight lang="sh">
 +
$ module load Score-P
 +
</syntaxhighlight>
 +
Depending on the compiler tool chain you want to use, you can choose between different available Score-P versions. Use the following command to get a list of all available Score-P versions:
 +
<syntaxhighlight lang="sh">
 +
$ module avail Score-P
 +
</syntaxhighlight>
  
 
== References ==
 
== References ==
 
[https://www.vi-hps.org/projects/score-p/ Score-P website].
 
[https://www.vi-hps.org/projects/score-p/ Score-P website].

Revision as of 15:51, 2 October 2020

Score-P is a performance measurement infrastructure for profiling, event tracing and online analysis of (parallel) HPC applications. It allows users to instrument and record the behavior of sequential, multi-process (MPI, SHMEM), thread-parallel (OpenMP, Pthreads) and accelerator-based (CUDA, OpenCL) applications as well as hybrid parallel applications.

General

Score-P supports a great variety of analysis tools and is open to new ones:

It uses the Open Trace Format Version 2 for event traces and the Cube4 profiling format for runtime summaries. OpenMP instrumentation is supported through the Opari2 instrumenter. Score-P is available under the New BSD Open Source license.

Instrumentation

Performing automatic instrumentation can simply be done by replacing your compiler command with the appropriate Score-P wrapper. The following example assumes your C compiler is given by the variable $CC:

$ scorep $CC <compile_flags>

Score-P also supports MPI applications. Again the corresponding MPI-compiler-wrapper for Score-P needs to be used to ensure correct linking of the MPI libraries. Assuming the MPI C compiler is referenced by the variable $MPICC this looks like:

$ scorep $MPICC <compile_flags>

Measurement

After compiling an instrumented binary it can just be executed and will generate measurement data during its execution.

Score-P offers several environment variables to control the behavior of the measurement facility within the binary. Some useful environment variables include:

  • $SCOREP_ENABLE_PROFILING - enable profiling
  • $SCOREP_ENABLE_TRACING - enable tracing
  • $SCOREP_TOTAL_MEMORY - total memory in bytes for the measurement system
  • $SCOREP_EXPERIMENT_DIRECTORY - name of the experiment directory
  • $SCOREP_FILTERING_FILE - a file name which contain the filter rules
  • $SCOREP_METRIC_PAPI - PAPI metric names to measure
  • $SCOREP_METRIC_RUSAGE - resource usage metric names to measure

Note that tracing is disabled by default because it can cause substantial additional overhead and may produce lots of data, which will ultimately perturb your application runtime behavior during measurement. More environment variables can be found in the Score-P documentation (Appendix G - Score-P Measurement Configuration) or using the command:

$ scorep-info config-vars --full

Analysis

Score-P produces experiment results in different commonly used formats.

Call-path profiles are stored in the CUBE4 format and can be viewed using the Cube tool.

Event traces are stored in the Open Trace Format 2 and can be visualized using tools such as Vampir or automatically analyzed with tools such as Scalasca.

Score-P Plugins

Score-P provides two plugin interfaces: metrics, which allows integrating new metric sources, and substrates, which allows adding new event consumers besides profiling and tracing. You can also write your own plugins.

Site specific notes

RWTH

In order to use Score-P on the RWTH cluster you need to load the corresponding module. Performance measurement tools are part of the DEV-TOOLS module group. This group can be loaded using the following command:

$ module load DEV-TOOLS

To load the Score-P tool just type and enter:

$ module load scorep

Depending on your currently loaded compiler and MPI implementation this will automatically load the correct version of Score-P for you. However, if you want to have an overview about all the available Score-P versions use the following command:

$ module avail scorep

TU Dresden

In order to use Score-P on the Taurus cluster you need to load the corresponding module.

$ module load Score-P

Depending on the compiler tool chain you want to use, you can choose between different available Score-P versions. Use the following command to get a list of all available Score-P versions:

$ module avail Score-P

References

Score-P website.