Hello, I'm trying to read hardware counters with PAPI for OpenMP threads. The following C code does not seem to work as the values for the first thread are fine, but for the second thread are not. What is the right use of PAPI and OpenMP? Code is attached. I'd appreciate any help. Thanks in advance.
84279296 84279296
0 0
id = 0, time = 0.000067, event[0] = 105, x = 24975000
id = 0, time = 0.000067, event[1] = 165, x = 24975000
id = 1, time = 0.000058, event[0] = 140419991043152, x = 99950000
id = 1, time = 0.000058, event[1] = 140420010960080, x = 99950000