24{
29 int mask2 = 0x8;
31 int num_events2;
33 int clockrate;
34 double test_flops;
35
36
38
42
43
46
48
49
52
53
54
56
58 if ( clockrate < 1 )
60
64
66
70
71
72
73
74
75
76
77
78
79
80
82
83
84 test_flops =
85 ( double ) (
values[0] )[0] *
86 ( double ) clockrate *( double ) 1000000.0;
87 test_flops = test_flops / ( double ) (
values[0] )[1];
88
90 printf( "Test case 9: start, stop for derived event PAPI_FLOPS.\n" );
91 printf( "------------------------------------------------------\n" );
93 printf(
"Default domain is: %d (%s)\n",
tmp,
96 printf(
"Default granularity is: %d (%s)\n",
tmp,
98 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
99 printf
100 ( "-------------------------------------------------------------------------\n" );
101
102 printf( "Test type : %12s%12s\n", "1", "2" );
103 printf(
TAB2,
"PAPI_FP_OPS : ", (
values[0] )[0], (
long long ) 0 );
104 printf(
TAB2,
"PAPI_TOT_CYC: ", (
values[0] )[1], (
long long ) 0 );
105 printf(
TAB2,
"PAPI_FLOPS : ", (
long long ) 0, (
values[1] )[0] );
106 printf
107 ( "-------------------------------------------------------------------------\n" );
108
109 printf( "Verification:\n" );
110 printf( "Last number in row 3 approximately equals %f\n", test_flops );
111 printf( "This test is no longer valid: PAPI_FLOPS is deprecated.\n" );
112 }
113
114
115
116
117
118
119
120
122 exit( 1 );
123}
Get PAPI library or event set options.
initialize the PAPI library.
Query if PAPI event exists.
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)
int add_test_events(int *number, int *mask, int allow_derived)
char * stringify_all_domains(int domains)
char * stringify_granularity(int granularity)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
long long ** allocate_test_space(int num_tests, int num_events)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
int remove_test_events(int *EventSet, int mask)