133{
138 float ratio;
140
141
143
147
151 }
152
155 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
156 }
157
159 ( pthread_self ) );
163 else
165 }
166#if defined(linux)
168#else
170#endif
171
172 pthread_attr_init( &attr );
173#ifdef PTHREAD_CREATE_UNDETACHED
174 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_UNDETACHED );
175#endif
176#ifdef PTHREAD_SCOPE_SYSTEM
177 retval = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
180#endif
181
184 rc = pthread_create( &
id[
i], &attr,
Thread, (
void * ) &flops[
i] );
187 }
189 pthread_join(
id[
i], NULL );
190
191 pthread_attr_destroy( &attr );
192
193 {
194 long long t = 0, r = 0;
198 }
200 printf( "Expected total overflows: %lld\n", t );
201 printf( "Received total overflows: %lld\n", r );
202 }
203 }
204
205
206
207
208 ratio = 1.0;
210 if (!
quiet) printf(
"Overflows thread %d: %d, expected %d\n",
212 }
213
217 }
218
220
221 pthread_exit( NULL );
222
223 return 0;
224
225}
get information about the system hardware
initialize the PAPI library.
Initialize thread support in the PAPI library.
static const PAPI_hw_info_t * hw_info
static int expected[NUM_THREADS]
static void * Thread(void *arg)
static long long mythreshold
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)