61 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
71 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
78 if ( max_mux > 32 ) max_mux = 32;
87 printf(
"\nFilling the event set with as many non-derived events as we can...\n" );
93 if ( pset.
count && ( strcmp( pset.
derived,
"NOT_DERIVED" ) == 0 ) ) {
96 printf(
"Failed trying to add %s\n",pset.
symbol);
110 test_skip(__FILE__,__LINE__,
"No events",0);
113 events = (
int * ) malloc( (
size_t ) j *
sizeof ( int ) );
115 test_fail( __FILE__, __LINE__,
"malloc events", 0 );
117 values = (
long long * ) malloc( (
size_t ) j *
sizeof (
long long ) );
119 test_fail( __FILE__, __LINE__,
"malloc values", 0 );
143 for (
i = 0, allvalid = 0;
i < j;
i++ ) {
152 printf(
"Caution: %d counters had zero values\n", allvalid );
157 test_fail( __FILE__, __LINE__,
"All counters returned zero", 5 );
160 for (
i = 0, allvalid = 0;
i < j;
i++ ) {
161 for ( k =
i + 1; k < j; k++ ) {
171 printf(
"Caution: %d counter pair(s) had identical values\n",
199 printf(
"%s: Does PAPI_multiplex_init() handle lots of events?\n",
201 printf(
"Using %d iterations\n",
NUM_ITERS );
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
int PAPI_add_event(int EventSet, int EventCode)
int PAPI_enum_event(int *EventCode, int modifier)
char derived[PAPI_MIN_STR_LEN]
Return codes and api definitions.
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
#define PAPI_MAX_MPX_CTRS
void test_skip(const char *file, int line, const char *call, int retval)
char events[MAX_EVENTS][BUFSIZ]
int PAPI_library_init(int version)
int PAPI_get_opt(int option, PAPI_option_t *ptr)
char symbol[PAPI_HUGE_STR_LEN]
int main(int argc, char **argv)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_assign_eventset_component(int EventSet, int cidx)
int PAPI_create_eventset(int *EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_multiplex_init(void)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_set_multiplex(int EventSet)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_set_domain(int domain)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
int PAPI_list_events(int EventSet, int *Events, int *number)