error_codes.c File Reference

Include dependency graph for error_codes.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 34 of file error_codes.c.

00035 {
00036     int i=0;
00037     int retval;
00038 
00039     tests_quiet( argc, argv );  /* Set TESTS_QUIET variable */
00040 
00041     if ( ( retval =
00042            PAPI_library_init( PAPI_VER_CURRENT ) ) != PAPI_VER_CURRENT )
00043         test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );
00044 
00045 
00046     printf( "\n----------------------------------\n" );
00047     printf( "For PAPI Version: %d.%d.%d.%d\n", 
00048             PAPI_VERSION_MAJOR( PAPI_VERSION ),
00049             PAPI_VERSION_MINOR( PAPI_VERSION ),
00050             PAPI_VERSION_REVISION( PAPI_VERSION ),
00051             PAPI_VERSION_INCREMENT( PAPI_VERSION ) );
00052     printf( "----------------------------------\n" );
00053     while ( 1 ) {
00054         char *errstr;
00055         errstr = PAPI_strerror( -i );
00056 
00057         if ( NULL == errstr ) {
00058             break;
00059         }
00060 
00061         printf( "Error code %4d: %s\n", -i, errstr );
00062         i++;
00063     }
00064     printf( "There are %d error codes defined\n", i );
00065     printf( "----------------------------------\n\n" );
00066     exit( 1 );
00067 }

Here is the call graph for this function:


Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1