flozz / pypapi

Python binding for the PAPI (Performance Application Programming Interface) library
https://flozz.github.io/pypapi/
Do What The F*ck You Want To Public License
41 stars 11 forks source link

When I run the given code, I have the following error, how to improve? tks #53

Open scutyuqiu opened 5 months ago

scutyuqiu commented 5 months ago

from pypapi import papi_low as papi from pypapi import events papi.library_init() evs = papi.create_eventset() papi.add_event(evs, events.PAPI_FP_OPS) papi.start(evs) aaa =1 result = papi.stop(evs) print(result) papi.cleanup_eventset(evs) papi.destroy_eventset(evs)

Traceback (most recent call last): File "/home/lab131_unix/Code/privacy/test.py", line 7, in papi.add_event(evs, events.PAPI_FP_OPS) File "/home/lab131_unix/anaconda3/envs/RLenvironment/lib/python3.9/site-packages/pypapi/exceptions.py", line 198, in papi_error_wrapper raise PapiMiscellaneousError() pypapi.exceptions.PapiMiscellaneousError: Unknown error code. (PAPI_EMISC)

flozz commented 4 months ago

Hello,

This project is only a Python binding for the PAPI library; it allows to use PAPI from Python. You issue seems related to the PAPI library itself and not the binding so you may ask for help on the PAPI project:

:)