Score-P, Scalasca, Cube#
Score-P, Scalasca, and Cube are typically used together to instrument, measure, and analyze an MPI application.
Documentation#
- Score-P
- Scalasca
- Cube
- Quick Reference on how to use the three tools together.
Installation#
For installation follow the steps in the documentation of the corresponding component.
Usage#
The usage is divided into three parts. A more detailed example can be found in the documentation of Scalasca.
-
Instrument code with Score-P by prefixing each compile command with
scorep
:- The command
scalasca --instrument
instead of usingscorep
is only provided for backward compatibility.
See the Score-P documentation for details.
- The command
-
Measure and profile/trace an application run with Scalasca.
Prefix the parallel run withscalasca --analyse
. This generates.cubex
files that can later be visualized with Cube. For measuring you can choose between:- Profiling (default), just run:
- Tracing enabled via flag
-t
:
See Measure for more options, Filtering to reduce the amount of collected data, or consult Scalasca's documentation for all details.
-
Analyze/examine results with Scalasca or Cube.
- without GUI:
scalasca --examine -s <experiment dir>
- with GUI:
cube <cubex file>
- Note there are multiple
cubex
files inside an experiment directory.
- Note there are multiple
See the Scalasca documentation or Cube documentation
- without GUI:
Measure#
Options for measuring are specified via environment variables. Important once include:
SCOREP_TOTAL_MEMORY=<memory>[M|G]
: Amount of memory for profile/tracing data to set aside on each process until data must be flushed to disc.SCOREP_METRIC_PERF=cycles,page-faults
: Addperf
eventscycles
andpage-faults
. Otherperf
events can be specified too.SCOREP_METRIC_RUSAGE=all
Use all or dedicated metrics from therusage
(resource usage) system call.
Further information can be found in Score-P's Getting Started guide or Measurement Configuration .
Filtering#
For more details consult Score-P's documentation about Filtering.
Generating a profile or trace can amount to a lot of memory.
By filtering specific functions or ranges can be included or excluded.
As a starting point check the scorep.score
file, located inside the experiment
directory.
It shows how much memory is required for Scalasca per process and which functions
can be filtered.
A simple file to exclude functions by name (Fortran functions, hence the trailing underscore):
SCOREP_REGION_NAMES_BEGIN
EXCLUDE
vector_IP_calc_dens
mod_sort.swap_i8_
mod_ranges.ranges_l
mod_sort.swap_i4_
SCOREP_REGION_NAMES_END
With Scalasca use a filter file with the -f <filter-file>
flag:
Score-P issues#
Feature test macros, that are set at the beginning of source files might be ignored, when preprocessed/compiled with Score-P.
- Score-P prefixes some includes of the Standard C library at the beginning of each file.
- Definition of feature test macros in your source files are then defined to late.
- Workaround: Define feature test macros on the command command line when invoking the
compiler. For example to define
_GNU_SOURCE
use-D_GNU_SOURCE
.