50{
52 long long values[2] = { 0, 0 };
59
60
62
66 }
67
70 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
71
72
78
81 } else {
83 "PAPI_TOT_INS not available on this Sun platform!", 0 );
84 }
85 } else {
86
88 }
89
91 if (!
quiet) printf(
"Trouble adding event\n");
92 test_skip(__FILE__,__LINE__,
"Event trouble",1);
93 }
94
97 }
98 else {
99#if defined(linux)
101#else
103#endif
104 }
105
109 }
110
114 }
115
119 }
120
122
126 }
127
131 }
132
136 }
137
139
143 }
144
145
146#if defined(linux) || defined(__ia64__) || defined(_POWER4)
147 num_flops *= 2;
148#endif
149
154
155 printf
156 ( "Test case: Overflow dispatch of 1st event in set with 1 event.\n" );
157 printf
158 ( "--------------------------------------------------------------\n" );
159 printf(
"Threshold for overflow is: %d\n",
mythreshold );
160 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
161 printf( "-----------------------------------------------\n" );
162
163 printf( "Test type : %16d%16d\n", 1, 2 );
165 printf(
"Overflows : %16s%16d\n",
"",
total );
166 printf( "-----------------------------------------------\n" );
167
168 printf( "Verification:\n" );
169
170
171
172
173
174 printf( "Row 3 approximately equals %u +- %u %%\n",
177
178 }
179
180
181
182
183
184
185
186
190 max =
194 test_fail( __FILE__, __LINE__,
"Overflows", 1 );
195
197
198 return 0;
199}
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.
Query if PAPI event exists.
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)
char vendor_string[PAPI_MAX_STR_LEN]
char model_string[PAPI_MAX_STR_LEN]