49{
59
60
62
63
67 }
68
69
72 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
73 }
74
75
76
77
78
80
82 if (!
quiet) printf(
"Trouble adding event!\n");
83 test_skip(__FILE__,__LINE__,
"Event add",1);
84 }
85
87 printf(
"Using %#x for the overflow event\n",
PAPI_event);
88 }
89
92 }
93 else {
94#if defined(linux)
96#else
98#endif
99 }
100
101
105
107
108
112
113
114
118 }
119
120
124 }
125
127
128
135
140 }
141
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" );
147
148 printf( "Test type : %16d%16d\n", 1, 2 );
151 printf(
"Overflows : %16s%16d\n",
"",
total );
152 printf( "-----------------------------------------------\n" );
153 }
154
158
162
164 printf( "Verification:\n" );
165#if defined(linux) || defined(__ia64__) || defined(_POWER4)
166 num_flops *= 2;
167#endif
169 printf( "Row 1 approximately equals %d %d\n", num_flops,
170 num_flops );
171 }
172 printf( "Column 1 approximately equals column 2\n" );
173 printf( "Row 3 approximately equals %u +- %u %%\n",
176 }
177
178
179
180
181
182
183
187 max =
191 printf( "Overflows: total(%d) > max(%lld) || "
193 }
195 test_fail( __FILE__, __LINE__,
"Overflows", 1 );
196 }
197
199 return 0;
200
201}
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)
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)