Skip to content
Snippets Groups Projects
scalasca.md 2.76 KiB
Newer Older
David Hrbáč's avatar
David Hrbáč committed
# Scalasca

## Introduction
Lukáš Krupčík's avatar
Lukáš Krupčík committed

[Scalasca](http://www.scalasca.org/) is a software tool that supports the performance optimization of parallel programs by measuring and analyzing their runtime behavior. The analysis identifies potential performance bottlenecks – in particular those concerning communication and synchronization – and offers guidance in exploring their causes.
Lukáš Krupčík's avatar
Lukáš Krupčík committed

Lukáš Krupčík's avatar
Lukáš Krupčík committed
Scalasca supports profiling of MPI, OpenMP and hybrid MPI+OpenMP applications.
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
## Installed Versions
There are currently two versions of Scalasca 2.0 [modules](../../environment-and-modules/) installed on Anselm:
Lukáš Krupčík's avatar
Lukáš Krupčík committed

-   scalasca2/2.0-gcc-openmpi, for usage with [GNU Compiler](../compilers/) and [OpenMPI](../mpi/Running_OpenMPI/),
-   scalasca2/2.0-icc-impi, for usage with [Intel Compiler](../compilers.html) and [Intel MPI](../mpi/running-mpich2/).
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
## Usage

Lukáš Krupčík's avatar
Lukáš Krupčík committed
Profiling a parallel application with Scalasca consists of three steps:

Lukáš Krupčík's avatar
Lukáš Krupčík committed
1.  Instrumentation, compiling the application such way, that the profiling data can be generated.
2.  Runtime measurement, running the application with the Scalasca profiler to collect performance data.
Lukáš Krupčík's avatar
Lukáš Krupčík committed
3.  Analysis of reports

### Instrumentation

Instrumentation via " scalasca -instrument" is discouraged. Use [Score-P instrumentation](score-p/).
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
### Runtime Measurement
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
After the application is instrumented, runtime measurement can be performed with the `scalasca -analyze` command. The syntax is:
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
`scalasca -analyze [scalasca options][launcher] [launcher options][program] [program options]`
Lukáš Krupčík's avatar
Lukáš Krupčík committed

An example :

Lukáš Krupčík's avatar
Lukáš Krupčík committed
```bash
Lukáš Krupčík's avatar
Lukáš Krupčík committed
    $ scalasca -analyze mpirun -np 4 ./mympiprogram
Lukáš Krupčík's avatar
Lukáš Krupčík committed
```
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
Some notable Scalasca options are:
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
-   **-t Enable trace data collection. By default, only summary data are collected.**
-   **-e <directory> Specify a directory to save the collected data to. By default, Scalasca saves the data to a directory with prefix scorep\_, followed by name of the executable and launch configuration.**
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
!!! Note
	Scalasca can generate a huge amount of data, especially if tracing is enabled. Please consider saving the data to a [scratch directory](../../storage/storage/).
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
### Analysis of Reports
Lukáš Krupčík's avatar
Lukáš Krupčík committed

For the analysis, you must have [Score-P](score-p/) and [CUBE](cube/) modules loaded. The analysis is done in two steps, first, the data is preprocessed and then CUBE GUI tool is launched.
Lukáš Krupčík's avatar
Lukáš Krupčík committed

To launch the analysis, run :

Lukáš Krupčík's avatar
Lukáš Krupčík committed
```bash
Lukáš Krupčík's avatar
Lukáš Krupčík committed
scalasca -examine [options] <experiment_directory>
Lukáš Krupčík's avatar
Lukáš Krupčík committed
```
Lukáš Krupčík's avatar
Lukáš Krupčík committed

If you do not wish to launch the GUI tool, use the "-s" option :

Lukáš Krupčík's avatar
Lukáš Krupčík committed
```bash
Lukáš Krupčík's avatar
Lukáš Krupčík committed
scalasca -examine -s <experiment_directory>
Lukáš Krupčík's avatar
Lukáš Krupčík committed
```
Lukáš Krupčík's avatar
Lukáš Krupčík committed

Lukáš Krupčík's avatar
Lukáš Krupčík committed
Alternatively you can open CUBE and load the data directly from here. Keep in mind that in that case the preprocessing is not done and not all metrics will be shown in the viewer.
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
Refer to [CUBE documentation](cube/) on usage of the GUI viewer.
Lukáš Krupčík's avatar
Lukáš Krupčík committed

David Hrbáč's avatar
David Hrbáč committed
## References

1.  <http://www.scalasca.org/>