Scalasca  (Scalasca 2.3.1, revision 14987)
Scalable Performance Analysis of Large-Scale Applications

To generate measurements which can be used as input for the Scalasca Trace Tools, user application programs first need to be instrumented. That is, special measurement calls have to be inserted into the program code which are then executed at specific important points (events) during the application run. Unlike previous versions of Scalasca which used a custom measurement system, this task is now accomplished by the community instrumentation and measurement infrastructure Score-P.

As already mentioned in the previous section, use of the scalasca -instrument and skin commands is discouraged, and therefore not discussed in detail. Instead, all the necessary instrumentation of user routines, OpenMP constructs and MPI functions should be handled by the Score-P instrumenter, which is accessed through the scorep command. Therefore, the compile and link commands to build the application that is to be analyzed should be prefixed with scorep (e.g., in a Makefile).

For example, to instrument the MPI application executable myapp generated from the two Fortran source files foo.f90 and bar.f90, the following compile and link commands

  % mpif90 -c foo.f90
  % mpif90 -c bar.f90
  % mpif90 -o myapp foo.o bar.o

have to be replaced by corresponding commands using the Score-P instrumenter:

  % scorep  mpif90 -c foo.f90
  % scorep  mpif90 -c bar.f90
  % scorep  mpif90 -o myapp foo.o bar.o

This will automatically instrument every routine entry and exit seen by the compiler, intercept MPI function calls to gather message-passing information, and link the necessary Score-P measurement libraries to the application executable.

The scorep instrumenter must be used with the link command to ensure that all required Score-P measurement libraries are linked with the executable. However, not all object files need to be instrumented, thereby avoiding measurements and data collection for routines and OpenMP constructs defined in those files. Instrumenting files defining OpenMP parallel regions is essential, as Score-P has to track the creation of new threads.

Although generally most convenient, automatic compiler-based function instrumentation as used by default may result in too many and/or too disruptive measurements, which can be addressed with selective instrumentation and measurement filtering. While the most basic steps will be briefly covered in Section Optimizing the measurement configuration, please refer to the Score-P manual [13] for details on the available instrumentation and filtering options.

Scalasca    Copyright © 1998–2016 Forschungszentrum Jülich GmbH, Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming