PAPI (Performance Application Programming Interface) provides the tool designer and application engineer with a consistent interface and methodology for use of the performance counter hardware found in most major microprocessors. PAPI enables software engineers to see, in near real time, the relation between software performance and processor events.
Questions tagged [papi]
86 questions
1
vote
1 answer
global static boolean pointer causes segmentation fault using pthread
New to pthread programming, and stuck on this error when working on a C++&C mixed code.
What I have done is to call the c code in the thread created by the c++ code. There is a static boolean pointer is_center used in the thread and should got free…

asksw0rder
- 1,066
- 1
- 12
- 19
1
vote
0 answers
PAPI Counter Issues
I wrote the following code to get L3 cache miss information.
#include
#include
#include
#include
int main( int argc, char *argv[] ) {
int i;
long long counters[3];
counters[0] = counters[1] =…

chamibuddhika
- 1,419
- 2
- 20
- 36
1
vote
3 answers
Performance of System()
For the function in c, system(), would it affect the hardware counters if you are trying to see how that command you ran performed
For example lets say im using the Performance API(PAPI) and the program is a precompiled matrix multiplication…

AshVLSI
- 45
- 1
- 5
1
vote
1 answer
Benchmarking C code - Flush Cache
I am wondering if it is possible to force a cache flush within c using linux x86. I have read several answers answering how to do this within the shell or using asm/cache.h (requiring me to write a linux module...)
I am using the PAPI library which…

costrouc
- 3,045
- 2
- 19
- 23
1
vote
1 answer
PAPI with CUDA power consumption
I'm trying to measure power consumption on a GPU. First of all I want to know if I can use PAPI to measure power consumption and also I want to know how can I compile CUDA with PAPI code if that's possible.

user1730250
- 582
- 2
- 9
- 26
1
vote
1 answer
Fortran PAPIF_stop always reads 0
I have a simple program in fortran that uses PAPI APIs to read performance counter values. All APIs (PAPIF_start, PAPIF_stop etc.) all work correctly (meaning, returns PAPI_OK). However, the values that PAPIF_stop reads are always 0. I tried another…

D E
- 11
- 1
1
vote
1 answer
Performance API on mac 10.8
Anyone tried to install papi(performance API) version 5.1.0 on the mac os 10.8 ? I am getting following errors on the make command.
zero_attach.c: In function ‘main’:
zero_attach.c:84: error: ‘PTRACE_ATTACH’ undeclared (first use in this…

Sagar Masuti
- 1,271
- 2
- 11
- 30
1
vote
0 answers
Events on Ivy Bridge with PAPI
I'm using PAPI to do some measurement and characteristic work, I've got several questions about the events on Ivy Bridge.
Based on the SDM Table 19-5 (Non-Architectural Performance Events In the Processor Core of 3rd Generation Intel® Core™ i7, i5,…

Yunqi Zhang
- 23
- 3
1
vote
1 answer
False autovectorization in Intel C compiler (icc)
I need to vectorize with SSE a some huge loops in a program. In order to save time I decided to let ICC deal with it. For that purpose, I prepare properly the data, taking into account the alignment and I make use of the compiler directives #pragma…

Genís
- 1,468
- 2
- 13
- 24
0
votes
0 answers
Measuring Perf events on Intel Alder/Raptor Lake CPUs inside a C program with perf code
I'm trying to measure perf events on a Intel Alder/Raptor Lake heterogeneous CPUs inside a program manager written in C. How can I enable those events and measure it inside the C program? I'm using the latest Linux kernel v6.3 that has more…

Manel Lurbe
- 1
- 1
0
votes
1 answer
papi_avail No events detected! - Error libpfm4 no default PMU found
I tried to make PAPI on my Fedora 37.
Machine specification:
Linux fedora-hp 6.0.9-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 16 17:36:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Getting FAILED tests when using make test.
It gives the following…

Devansh_Jain_21
- 108
- 4
0
votes
0 answers
papi_avail shows event's, can't access in C
I'm trying to run PAPI on an Odroid-XU4, I've installed PAPI and when I run papi_avail -a I can see 16 events available.
I've set perf_event_paranoidto -1.
When I try to call PAPI using C, it always says:
Event doesn't exist
even though I know the…

Francis
- 15
- 6
0
votes
2 answers
some problems from using PAPI
Have u ever used PAPI?
Because PAPI support the kernel version >2.6.32(perf-events), I choose it to test my code.
Why I only get the same number(result) no matter what event-code I chose,such as PAPI_TOT_INS,PAPI_BR_INS,etc..
#include…

xunzhang
- 2,838
- 6
- 27
- 44
0
votes
1 answer
Not able to run PAPI code with papi.h, error : cannot open shared object file in GCC
I am trying to learn papi api to monitor the performance of various CPU events. To begin with, I ran one of the sample snippets that PAPI official documentation mentions. Below is the code
#include
#include
#include…

Sabarna Hazra
- 23
- 1
- 3
0
votes
1 answer
How to put 7 events in one eventset in PAPI
In PAPI Im trying to put 7 events in one eventset so I can read 7 results in one operation but I always get return -1 ,can anyone help me?my code like this:
int events1[] =…

bing zhu
- 11
- 4