Skip to content

Commit

Permalink
Merge pull request #1 from flozz/v6.0.0.1-fixes
Browse files Browse the repository at this point in the history
V6.0.0.1 fixes
  • Loading branch information
SerodioJ authored Mar 5, 2024
2 parents ee55cc3 + d125040 commit 537df3e
Show file tree
Hide file tree
Showing 5 changed files with 316 additions and 371 deletions.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example usage:
::

# Low Level API

from pypapi import papi_low as papi
from pypapi import events

Expand All @@ -51,7 +51,7 @@ Example usage:
install
papi_high
papi_low
types
structs
events
consts
exceptions
Expand Down
3 changes: 1 addition & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ As PAPI is a C library, it must be compiled. On Ubuntu / Debian, you can
install the ``build-essential`` package.


From PYPI
From PyPI
---------

To install PyPAPI from PYPI, simply use pip::
Expand Down Expand Up @@ -35,4 +35,3 @@ Finally, execute the following command::
you may require root permission if you want to install the package
system-wide.


File renamed without changes.
38 changes: 18 additions & 20 deletions pypapi/papi_high.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
papi_high.hl_region_end("computation")
To change where results are stored or which events to record is achieved with environment variables:
To change where results are stored or which events to record is achieved with
environment variables.
Bash:
.. code-block:: bash
::
# bash
export PAPI_EVENTS="PAPI_TOT_INS,PAPI_TOT_CYC"
export PAPI_OUTPUT_DIRECTORY="path/to/output"
::
# python
Python::
import os
os.environ["PAPI_EVENTS"] = "PAPI_TOT_INS,PAPI_TOT_CYC"
Expand All @@ -38,11 +42,9 @@
# int PAPI_hl_region_begin(const char* region); /**< read performance events at the beginning of a region */
@papi_error
def hl_region_begin(region):
"""hl_region_begin(region):
Read performance events at the beginning of a region
"""Read performance events at the beginning of a region.
:param (string) region: name of instrumented region
:param string region: name of instrumented region
:returns: Operation status
:rtype: int
Expand All @@ -58,11 +60,10 @@ def hl_region_begin(region):
# int PAPI_hl_read(const char* region);
@papi_error
def hl_read(region):
"""hl_read(region):
Read performance events inside of a region and store the difference to the corresponding beginning of the region
"""Read performance events inside of a region and store the difference to
the corresponding beginning of the region.
:param (string) region: name of instrumented region
:param string region: name of instrumented region
:returns: Operation status
:rtype: int
Expand All @@ -78,11 +79,10 @@ def hl_read(region):
# int PAPI_hl_region_end(const char* region);
@papi_error
def hl_region_end(region):
"""hl_region_end(region):
"""Read performance events at the end of a region and store the difference
to the corresponding beginning of the region.
Read performance events at the end of a region and store the difference to the corresponding beginning of the region
:param (string) region: name of instrumented region
:param string region: name of instrumented region
:returns: Operation status
:rtype: int
Expand All @@ -98,9 +98,7 @@ def hl_region_end(region):
# int PAPI_hl_stop();
@papi_error
def hl_stop():
"""hl_stop():
Stops a running high-level event set
"""Stops a running high-level event set.
:returns: Operation status
:rtype: int
Expand Down
Loading

0 comments on commit 537df3e

Please sign in to comment.