48{
57
58
60
64 }
65
68 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
69 }
70
71#if defined(POWER3) || defined(__sparc__)
73#else
74
76#endif
77
79 if (!
quiet) printf(
"Trouble creating events\n");
80 test_skip(__FILE__,__LINE__,
"Creating event",1);
81 }
82
85 else
86#if defined(linux)
88#else
90#endif
91
95
99
103
107
109
113
117
121
123
127
131
133#if defined(linux) || defined(__ia64__) || defined(_POWER4)
134 num_flops *= 2;
135#endif
136
141
142 printf
143 ( "Test case: Overflow dispatch of 1st event in set with 2 events.\n" );
144 printf
145 ( "---------------------------------------------------------------\n" );
146 printf(
"Threshold for overflow is: %d\n",
mythreshold );
147 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
148 printf( "-----------------------------------------------\n" );
149
150 printf( "Test type : %16d%16d\n", 1, 2 );
153 printf(
"Overflows : %16s%16d\n",
"",
total );
154 printf( "-----------------------------------------------\n" );
155
156 printf( "Verification:\n" );
157
158
159
160
161
162
163
164
165
166 printf( "Row 3 approximately equals %u +- %u %%\n",
169 }
170
171
172
173
174
175
176
180 max =
184 test_fail( __FILE__, __LINE__,
"Overflows", 1 );
185
187
188 return 0;
189}
static const PAPI_hw_info_t * hw_info
add PAPI preset or native hardware event to an event set
Create a new empty PAPI 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
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
void handler(int EventSet, void *address, long long overflow_vector, void *context)
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
int find_nonderived_event(void)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)