timemory icon indicating copy to clipboard operation
timemory copied to clipboard

Configuring papi events failed

Open include-jacopo opened this issue 3 years ago • 4 comments

Hi, I'm interested in evaluating PAPI metrics using Timemory but values found are always zero. I've installed PAPI 6.0 so I'm wondering if this version is compatible with the last version of timemory or I should downgrade.

This is the output that I got when trying to execute the code:

Warning!! Failure to add events to evente set : PAPI_error 1: (null)
[pid=xxxx][tid=0][timemory/.../papi/papi_common.hpp:321@'initialize']> Warning! Configuring 2 papi events failed...
[pid=xxxx][tid=0][timemory/.../papi/papi_common.hpp:321@'initialize']> Warning! Configuring 2 papi events failed...

The code I would like to test looks like this:

include <timemory/library.h>
int main() {
    timemory_init_library(argc, argv);
    timemory_set_default("cpu_roofline");
    
    // some initialization code...
    
    timemory_push_region("main");
    myFunction(...)
    timemory_pop_region("main);
    timemory_finalize_library();
    
    return 0;
}

void myFunction(....) {
    uint64_t idx = timemory_get_begin_record("name");
    //Some code
    timemory_end_record(idx);
}

Thanks in advance.

include-jacopo avatar Nov 10 '22 14:11 include-jacopo

I don't think this is a timemory/PAPI compatibility issue.

What is the value of /proc/sys/kernel/perf_event_paranoid?

jrmadsen avatar Nov 10 '22 14:11 jrmadsen

The value of /proc/sys/kernel/perf_event_paranoid is 0

include-jacopo avatar Nov 10 '22 14:11 include-jacopo

Try setting TIMEMORY_PAPI_MULTIPLEXING=ON

Check with timemory-avail that is the right option name. And maybe run timemory-avail -H and verify that the hardware counters for single and double precision flops are available.

jrmadsen avatar Nov 10 '22 14:11 jrmadsen

If none of that helps, if you are building from source, checkout the omnitrace branch and try that. That's the most up-to-date branch.

If none of that works, let me know and I'll track this down and fix it -- probably won't be until next week though.

jrmadsen avatar Nov 10 '22 14:11 jrmadsen