22 int ncpu, nctr,
i, actual_domain;
31 fprintf(
stderr,
"Library mismatch: code %d, library %d\n",
retval,
46 actual_domain =
options.domain.domain;
60 values = (
long long * ) malloc( ncpu * nctr *
sizeof (
long long ) );
61 memset(
values, 0x0, ( ncpu * nctr *
sizeof (
long long ) ) );
89 printf(
"Test case: per node\n" );
90 printf(
"-------------------\n\n" );
92 printf(
"This machine has %d cpus, each with %d counters.\n", ncpu, nctr );
93 printf(
"Test case asked for: PAPI_DOM_ALL\n" );
94 printf(
"Test case got: " );
96 printf(
"PAPI_DOM_USER " );
98 printf(
"PAPI_DOM_KERNEL " );
100 printf(
"PAPI_DOM_OTHER " );
103 for (
i = 0;
i < ncpu;
i++ ) {
104 printf(
"CPU %d\n",
i );
105 printf(
"PAPI_TOT_CYC: \t%lld\n",
values[0 +
i * nctr] );
106 printf(
"PAPI_TOT_INS: \t%lld\n",
values[1 +
i * nctr] );
110 (
"\n-------------------------------------------------------------------------\n" );
116 (
"-------------------------------------------------------------------------\n" );
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Get PAPI library or event set options.
get real time counter value in clock cycles Returns the total real time passed since some arbitrary s...
get real time counter value in microseconds
initialize the PAPI library.
Set PAPI library or event set options.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
A pointer to the following is passed to PAPI_set/get_opt()