taucmdr.cf.software.papi_installation module

PAPI software installation management.

PAPI is used to measure hardware performance counters.

class taucmdr.cf.software.papi_installation.PapiInstallation(sources, target_arch, target_os, compilers)[source]

Bases: AutotoolsInstallation

Encapsulates a PAPI installation.

_prepare_src(*args, **kwargs)[source]

Prepares source code for installation.

Acquires package source code archive file via download or file copy, unpacks the archive, and verifies that required paths exist.

Parameters:

reuse_archive (bool) – If True, attempt to reuse archive files.

Returns:

The path to the unpacked source code files.

Return type:

str

Raises:

ConfigurationError – The source code couldn’t be acquired or unpacked.

check_metrics(metrics)[source]

Checks compatibility of PAPI metrics.

Extracts all PAPI metrics from metrics and executes papi_event_chooser to check compatibility.

Parameters:

metrics (list) – List of metrics.

Raises:

ConfigurationError – PAPI metrics are not compatible on the current host.

configure(flags, env=None)[source]

Invoke configure.

Parameters:

flags (list) – Command line flags to pass to configure.

Raises:

SoftwarePackageError – Configuration failed.

make(flags)[source]

Invoke make.

Parameters:

flags (list) – Command line flags to pass to make.

Raises:

SoftwarePackageError – Compilation failed.

papi_metrics(event_type='PRESET', include_modifiers=False)[source]

List PAPI available metrics.

Returns a list of (name, description) tuples corresponding to the requested PAPI event type and possibly the event modifiers.

Parameters:
  • event_type (str) – Either “PRESET” or “NATIVE”.

  • include_modifiers (bool) – If True include event modifiers, e.g. BR_INST_EXEC:NONTAKEN_COND as well as BR_INST_EXEC.

Returns:

List of event name/description tuples.

Return type:

list

parse_metrics(metrics)[source]

Extracts PAPI metrics from a list of metrics and strips TAU’s metric prefixes.

xml_event_info()[source]