43{
47
48
50
51 for (
i = 0;
i <
MAX;
i++ ) {
54 }
55
58
62
63#ifdef MULTIPLEX
65 printf( "Activating PAPI Multiplex\n" );
66 }
67
70 test_fail( __FILE__, __LINE__,
"PAPI multiplex init fail\n",
72 }
73
74#endif
75
79
80#ifdef MULTIPLEX
81
82
83
86 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
88
91 test_skip( __FILE__, __LINE__,
"Multiplex not supported", 1 );
92 }
95#endif
96
101 if (!
quiet) printf(
"Trouble adding events\n");
103 "PAPI add PAPI_FP_INS or PAPI_TOT_INS fail\n",
retval );
104 }
else if ( !
quiet ) {
105 printf( "PAPI_TOT_INS\n" );
106 }
107 }
else if ( !
quiet ) {
108 printf( "PAPI_FP_INS\n" );
109 }
110
113 test_fail( __FILE__, __LINE__,
"PAPI add PAPI_TOT_CYC fail\n",
116 printf( "PAPI_TOT_CYC\n" );
117 }
118
122
124
128
130
134
135#ifdef RESET
139#endif
140
142
146
148 printf( "values1 is:\n" );
151
152 printf( "\nvalues2 is:\n" );
155 printf( "\nvalues3 is:\n" );
158
159#ifndef RESET
160 printf( "\nPAPI value (2-1) is : \n" );
163 printf( "\nPAPI value (3-2) is : \n" );
165 long long diff;
168 if (diff<0) {
169 test_fail( __FILE__, __LINE__,
"Multiplexed counter decreased", 1 );
170 }
171 }
172#endif
173
174 printf( "\n\nVerification:\n" );
175 printf( "From start to first PAPI_read %d fp operations are made.\n",
177 printf( "Between 1st and 2nd PAPI_read %d fp operations are made.\n",
179 printf( "Between 2nd and 3rd PAPI_read %d fp operations are made.\n",
180 0 );
181 printf( "\n" );
182 }
183
185
186 return 0;
187
188}
add PAPI preset or native hardware event to an event set
Assign a component index to an existing but empty EventSet.
Create a new empty PAPI EventSet.
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
Read hardware counters from an event set.
Reset the hardware event counts in an event set.
Convert a standard event set to a multiplexed event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
long long PAPI_values2[PAPI_MAX_EVENTS]
void funcX(double a[MAX], double b[MAX], int n)
long long PAPI_values3[PAPI_MAX_EVENTS]
long long PAPI_values1[PAPI_MAX_EVENTS]
void funcA(double a[MAX], double b[MAX], int n)
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)