quepas / oPAPI

Simple Octave API for PAPI (Performance Application Programming Interface).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEPRECATED!!! Instead, please consider using mPAPI which works for MATLAB and Octave.

oPAPI

Simple Octave API for PAPI (Performance Application Programming Interface).

Installation

  1. Install PAPI >=5.5.1
  2. Install package liboctave-dev if you don't have it already
  3. Run octave in oPAPI directory
  4. Compile oPAPI_register, oPAPI_tic, and oPAPI_toc functions from Octave console using mex:
mex -I/usr/local/include oPAPI_register.c -L/usr/local/lib/ -lpapi -output oPAPI_register
mex -I/usr/local/include oPAPI_tic.c -L/usr/local/lib/ -lpapi -output oPAPI_tic
mex -I/usr/local/include oPAPI_toc.c -L/usr/local/lib/ -lpapi -output oPAPI_toc

Where directory /usr/local/include contains papi.h header and directory /usr/local/lib/ contains libpapi.so static library.

Usage

  1. Register hardware performance monitoring counters (PMC) using preset or native events:
>> oPAPI_register('FP_ARITH:SCALAR_SINGLE', 'L1D:REPLACEMENT', 'PAPI_L2_ICA')
  1. Start counters:
>> oPAPI_tic
  1. Read counters measurements:
>> oPAPI_toc

ans = [0   355  1698]

Comments

  • The number of hardware counters available on the system defines the upper limit of counters you can register using oPAPI_register function.
  • Not all hardware counters can be mixed and used simultaneously.

About

Simple Octave API for PAPI (Performance Application Programming Interface).

License:MIT License


Languages

Language:C 100.0%