22 const int NUM_COUNTERS = 1;
24 long long values[NUM_COUNTERS];
25 float rtime, ptime, ipc, mflips, mflops;
26 long long ins, flpins, flpops;
40 if ( !
quiet ) printf(
"Testing PAPI_num_components... " );
47 if ( !
quiet ) printf(
"No components found, skipping high level tests\n");
48 test_skip(__FILE__, __LINE__,
"No components found", 0);
51 if ( !
quiet ) printf(
"Testing PAPI_num_counters... " );
62 if ( !
quiet ) printf(
"Testing PAPI_start_counters... " );
76 if (!
quiet) printf(
"\nCould not start PAPI_TOT_INS\n");
80 if ( !
quiet ) printf(
"started PAPI_TOT_INS\n" );
84 if ( !
quiet ) printf(
"Testing PAPI_stop_counters... " );
100 else if ( !
quiet ) printf(
"stopped counting PAPI_TOT_INS\n" );
111 if ( !
quiet ) printf(
"Testing PAPI_read_counters... " );
128 if ( !
quiet ) printf(
"read PAPI_TOT_INS counts and reset counter\n" );
134 if ( !
quiet ) printf(
"Testing PAPI_accum_counters... " );
151 if ( !
quiet ) printf(
"added PAPI_TOT_INS counts and reset counter\n" );
164 if ( !
quiet ) printf(
"Testing PAPI_ipc... " );
191 if ( !
quiet ) printf(
"got instructions per cycle, real and processor time\n" );
204 if ( !
quiet ) printf(
"Testing PAPI_flips... " );
234 if ( !
quiet ) printf(
"got Mflips/s, real and processor time\n" );
246 if ( !
quiet ) printf(
"Testing PAPI_flops... " );
276 printf(
"got Mflops/s, real and processor time\n" );
void test_pass(const char *filename)
static int Events[NUM_EVENTS]
int PAPI_ipc(float *rtime, float *ptime, long long *ins, float *ipc)
int PAPI_flops(float *rtime, float *ptime, long long *flpops, float *mflops)
int PAPI_accum_counters(long long *values, int array_len)
int PAPI_num_components(void)
void test_warn(const char *file, int line, const char *call, int retval)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_flips(float *rtime, float *ptime, long long *flpins, float *mflips)
int PAPI_library_init(int version)
int PAPI_stop_counters(long long *values, int array_len)
int PAPI_get_cmp_opt(int option, PAPI_option_t *ptr, int cidx)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_read_counters(long long *values, int array_len)
int PAPI_num_counters(void)
int PAPI_start_counters(int *events, int array_len)
static long long values[NUM_EVENTS]