Shimuuar / tasty-papi

Other
8 stars 1 forks source link

Any benchmark returns Error -7 #4

Open Daniel-Diaz opened 1 year ago

Daniel-Diaz commented 1 year ago

I wanted to give the library a try, but no matter what the test is all I get is:

Exception: PAPI call failed: -7
CallStack (from HasCallStack):
    error, called at ./Test/Tasty/PAPI.hs:255:23 in tasty-papi-0.1.0.1-Kw6DOWXmIMHAcGQn6Tb90Z:Test.Tasty.PAPI

Does this mean my system does not support it? I am in Ubuntu 22.04. Installed papi with apt install libpapi-dev. Compiled using stack against nightly-2023-11-05, adding tasty-papi-0.1.0.1.

Thanks.

Shimuuar commented 1 year ago

Please try out version 0.1.1.0. It has human readable error message. It could possibly answer your question

PAPI relies pon hardware counters so it could be hardware problem, CPU may miss particular counter. They also could be unavailable in virtualized environment

Daniel-Diaz commented 1 year ago

Thanks. This is what I get now: PAPI: Failed to add counter TOT_INS: Event does not exist [-7].

Daniel-Diaz commented 1 year ago

In case it helps, my libpapi-dev is at version 6.0.0.

Shimuuar commented 1 year ago

PAPI: Failed to add counter TOT_INS: Event does not exist [-7].

Do you try to make it work locally or in vurtualized environment. In latter case it could be locked out. I tried to use this library on github CI and it didn't work

Daniel-Diaz commented 1 year ago

PAPI: Failed to add counter TOT_INS: Event does not exist [-7].

Do you try to make it work locally or in vurtualized environment. In latter case it could be locked out. I tried to use this library on github CI and it didn't work

Sorry, I didn't see any notification that you answered until now. Weird.

Anyway, it's not a virtual environment. It's Ubuntu installed on a regular machine.

Shimuuar commented 10 months ago

@Daniel-Diaz I found another diagnostic tool which could be of use to you: papi_avail it should list available counters on your system.