30#define OVER_FMT "handler(%d ) Overflow at %p! bit=%#llx \n"
31#define OUT_FMT "%-12s : %16lld%16lld\n"
48main(
int argc,
char **argv )
72 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
82 if (!
quiet) printf(
"Trouble adding event!\n");
83 test_skip(__FILE__,__LINE__,
"Event add",1);
87 printf(
"Using %#x for the overflow event\n",
PAPI_event);
142 printf(
"Test case: Overflow dispatch of 2nd event in set with 2 events.\n" );
143 printf(
"---------------------------------------------------------------\n" );
144 printf(
"Threshold for overflow is: %d\n",
mythreshold );
145 printf(
"Using %d iterations of c += a*b\n", num_flops );
146 printf(
"-----------------------------------------------\n" );
148 printf(
"Test type : %16d%16d\n", 1, 2 );
151 printf(
"Overflows : %16s%16d\n",
"",
total );
152 printf(
"-----------------------------------------------\n" );
164 printf(
"Verification:\n" );
165#if defined(linux) || defined(__ia64__) || defined(_POWER4)
169 printf(
"Row 1 approximately equals %d %d\n", num_flops,
172 printf(
"Column 1 approximately equals column 2\n" );
173 printf(
"Row 3 approximately equals %u +- %u %%\n",
191 printf(
"Overflows: total(%d) > max(%lld) || "
195 test_fail( __FILE__, __LINE__,
"Overflows", 1 );
static const PAPI_hw_info_t * hw_info
Empty and destroy an EventSet.
Empty and destroy an EventSet.
Convert a numeric hardware event code to a name.
get information about the system hardware
initialize the PAPI library.
Set up an event set to begin registering overflows.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long mythreshold
static long long values[NUM_EVENTS]
void handler(int EventSet, void *address, long long overflow_vector, void *context)
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
int add_two_nonderived_events(int *num_events, int *papi_event, int *mask)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)