Skip to content

mknobi/scorep_binding_python

 
 

Repository files navigation

scorep

scorep is a module that allows tracing of python scripts using Score-P.

Install

You need to have scorep-config in your PATH variable.

Then simply run

pip install .

Use

To trace the full script you need to run

python -m scorep <script.py>

The usual Score-P environment Variables will be respected. Please have a look at:

www.vi-hps.org

and

Score-P Documentation

There is also a small HowTo in the wiki.

Compatibility

Working

  • python3
  • python2.7
  • mpi using mpi4py

Not Working

Partialy working

User instrumentation

In some cases, the user might want to define a region, log some parameters, or just disable tracing for a certain area. To do so the module implements a few functions:

scorep.user.region_begin(name)
scorep.user.region_end(name)

These functions allow the definition of user regions. name defines the name of a region. Each user.region_begin shall have a corresponding call to user.region_end.

scorep.user.enable_recording()
scorep.user.disable_recording()

These functions allow enabling and disabling of the tracing.

scorep.user.parameter_int(name, val)
scorep.user.parameter_uint(name, val)
scorep.user.parameter_string(name, string)

These functions allow passing user parameters to Score-P. These parameters can be int, uint and string. name defines the name of the parameter, while val or string defines the value that is passed to Score-P.

Tracing

The tracing uses Score-P User instrumentation. The python trace module was reworked, to pass the region names to SCOREP_USER_REGION_BEGIN and SCOREP_USER_REGION_END instead of printing. All other features of the tracing module where striped.

MPI

This version of the Score-P python tracing plugin supports MPI. To use it please specify --mpi:

python -m scorep --mpi <script.py>

This will ensure, that the right Score-P libs are in LD_PRELOAD. It will re-execute the tracing script, with the preloaded libs.

About

Allows tracing of python code using Score-P

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 81.7%
  • C++ 18.3%