test case for the linux-infiniband component Adapted from its counterpart in the net component.
24{
28 int *codes = 0;
31 int total_events=0;
32 int r;
34
35
37
38
42 }
43
45 printf("Trying all infiniband events\n");
46 }
47
49
50 for(cid=0; cid<numcmp; cid++) {
51
53 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n",-1);
54 }
55
57 printf("Component %d - %d events - %s\n", cid,
59 }
60
61 if ( strstr(cmpinfo->
name,
"infiniband") == NULL) {
62 continue;
63 }
65 test_skip(__FILE__,__LINE__,
"Component infiniband is disabled", 0);
66 continue;
67 }
68
72
74
78 }
79
81
85
89 }
91
95 }
96
97 total_events++;
98
101 }
102
106 }
107
108
109
110
111
112
113 sleep(10);
114
118 }
119
123 }
124
128 }
129
133 }
134
136 free(codes);
138 }
139
140 if (total_events==0) {
141 test_skip(__FILE__,__LINE__,
"No infiniband events found", 0);
142 }
143
145
146 return 0;
147}
const char * names[NUM_EVENTS]
add PAPI preset or native hardware event to an event set
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Enumerate PAPI preset or native events for a given component.
Convert a numeric hardware event code to a name.
get information about a specific software component
initialize the PAPI library.
Get the number of components available on the system.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
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 name[PAPI_MAX_STR_LEN]