9 main(
int argc,
char **argv )
26 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
34 printf(
"Testing real time clock. (CPU Max %d MHz, CPU Min %d MHz)\n",
36 printf(
"Sleeping for 10 seconds.\n" );
47 printf(
"%f Computed MHz.\n",
70 if (!
quiet) printf(
"NOTE: Elapsed real time less than 9 seconds (%lld us)!\n",
elapsed_us );
71 test_fail(__FILE__,__LINE__,
"Real time too short",1);
75 if (!
quiet) printf(
"NOTE: Elapsed real time greater than 11 seconds! (%lld us)\n",
elapsed_us );
76 test_fail(__FILE__,__LINE__,
"Real time too long",1);
79 if ( (
float ) elapsed_cyc < 9.0 * hw_info->cpu_max_mhz * 1000000.0 )
80 if (!
quiet) printf(
"NOTE: Elapsed real cycles less than 9*MHz*1000000.0!\n" );
82 if (!
quiet) printf(
"NOTE: Elapsed real cycles greater than 11*MHz*1000000.0!\n" );
void test_pass(const char *filename)
int main(int argc, char **argv)
Return codes and api definitions.
int PAPI_library_init(int version)
long long PAPI_get_real_usec(void)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
long long PAPI_get_real_cyc(void)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static const PAPI_hw_info_t * hw_info