137{
149
151
152 if ( argc > 1 ) {
153 if ( !strcmp( argv[1], "TESTS_QUIET" ) ) {
154 }
155 else {
156 sleep_time = atoi( argv[1] );
157 if ( sleep_time <= 0 )
159 }
160 }
161
176
179 }
180
181
183 printf( "\nAccuracy check of multiplexing routines.\n" );
184 printf( "Comparing a multiplex measurement with separate measurements.\n\n" );
185 }
186
187
191 }
192
193
195 for (
i = 0;
i < nevents;
i++ ) {
197 (info.
count && (strcmp( info.
derived,
"NOT_DERIVED")==0))) {
199 }
200 else {
203 }
204 nevents--;
206 }
207 }
208
209
210 if ( nevents < 2 ) {
211 test_skip( __FILE__, __LINE__,
"Not enough events to multiplex...", 0 );
212 }
213
214 if (!
quiet) printf(
"Using %d events\n\n", nevents );
215
219 "PAPI multiplex init fail\n",
retval );
220 }
221
222
223
224
225
226 t2 = 10000 * 20 * nevents;
228 test_skip( __FILE__, __LINE__,
"This test takes too much time",
230 }
231
232
234
235
239
242 "do_flops3 takes no time to run!\n",
retval);
243 }
244
245
247 iters = iters * (
int ) (
t2 /
t1 );
249 printf( "Modified iteration count to %d\n\n", iters );
250 }
251 }
252
254
255
256
258
259
260
263
264
265
266
267
270 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
272
275 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
276 }
277
279 }
280
283
284 if (!
quiet) printf(
"\nPAPI multiplexed measurements:\n" );
293
294 for ( j = 0; j < nevents; j++ ) {
299 printf( "\n" );
300 }
301 }
302
304
312
313
314
316
318
320
321 return 0;
322}
static struct timeval t1 t2
add multiple PAPI presets or native hardware events to an event set
Assign a component index to an existing but empty EventSet.
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
get real time counter value in microseconds
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
Remove an array of hardware event codes from a PAPI event set.
Convert a standard event set to a multiplexed event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
double do_flops3(double x, int iters, int quiet)
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
void check_values(int eventset, int *events, int nevents, long long *values, long long *refvalues)
void ref_measurements(int iters, int *eventset, int *events, int nevents, long long *refvalues)
char short_descr[PAPI_MIN_STR_LEN]
char symbol[PAPI_HUGE_STR_LEN]
char derived[PAPI_MIN_STR_LEN]