31 for (
i = 0;
i < n;
i++ ) {
46 test_fail( __FILE__, __LINE__,
"PAPI_register_thread", ret );
49 test_fail( __FILE__, __LINE__,
"PAPI_create_eventset", ret );
53 if (!
TESTS_QUIET) printf(
"Event set %d created\n", eventset );
61 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component", ret );
67 test_skip( __FILE__, __LINE__,
"Multiplexing not supported", 1 );
71 test_fail( __FILE__, __LINE__,
"PAPI_set_multiplex", ret );
77 test_fail( __FILE__, __LINE__,
"PAPI_add_events", ret );
83 test_fail( __FILE__, __LINE__,
"PAPI_start", ret );
91 test_fail( __FILE__, __LINE__,
"PAPI_stop", ret );
97 test_fail( __FILE__, __LINE__,
"PAPI_cleanup_eventset", ret );
103 test_fail( __FILE__, __LINE__,
"PAPI_destroy_eventset", ret );
109 test_fail( __FILE__, __LINE__,
"PAPI_unregister_thread", ret );
129 int tmp = atoi( argv[1] );
163 if ( info.
count == 1 ) {
167 if (!
quiet) printf(
"Skipping derived event %s\n", info.
symbol );
176 test_skip(__FILE__,__LINE__,
"No events found",0);
181 if (!
quiet) printf(
"Creating %d threads:\n", nthreads );
185 if ( threads == NULL ) {
191 for (
i = 0;
i < nthreads;
i++ ) {
201 for (
i = 0;
i < nthreads;
i++ ) {
202 retval = pthread_join( threads[
i], NULL );
210 if (!
quiet) printf(
"Done." );
216 pthread_exit( NULL );
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.
Enumerate PAPI preset or native events.
Get component specific PAPI options.
Get the event's name and description info.
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
Notify PAPI that a thread has 'appeared'.
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.
Initialize thread support in the PAPI library.
Notify PAPI that a thread has 'disappeared'.
#define PAPI_MAX_MPX_CTRS
static long long values[NUM_EVENTS]
static double a[MATRIX_SIZE][MATRIX_SIZE]
Return codes and api definitions.
unsigned long int pthread_t
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)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char symbol[PAPI_HUGE_STR_LEN]