Go to the source code of this file.
◆ main()
Definition at line 20 of file pernode.c.
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" );
int PAPI_stop(int EventSet, long long *values)
int PAPI_add_event(int EventSet, int EventCode)
A pointer to the following is passed to PAPI_set/get_opt()
int PAPI_set_opt(int option, PAPI_option_t *ptr)
int PAPI_library_init(int version)
int PAPI_get_opt(int option, PAPI_option_t *ptr)
int PAPI_create_eventset(int *EventSet)
long long PAPI_get_real_usec(void)
long long PAPI_get_real_cyc(void)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]