PAPI  5.0.1.0
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)

Variables

int _papi_hwi_num_errors

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 35 of file error_codes.c.

{
    int i;
    int retval;

    tests_quiet( argc, argv );  /* Set TESTS_QUIET variable */

    if ( ( retval =
           PAPI_library_init( PAPI_VER_CURRENT ) ) != PAPI_VER_CURRENT )
        test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );


    printf( "\n----------------------------------\n" );
    printf( "For PAPI Version: %d.%d.%d.%d\n", 
            PAPI_VERSION_MAJOR( PAPI_VERSION ),
            PAPI_VERSION_MINOR( PAPI_VERSION ),
            PAPI_VERSION_REVISION( PAPI_VERSION ),
            PAPI_VERSION_INCREMENT( PAPI_VERSION ) );
    printf( "There are %d error codes defined\n", _papi_hwi_num_errors );
    printf( "----------------------------------\n" );
    for (i = 0; i < _papi_hwi_num_errors; i++) {
        char *errstr;
        errstr = PAPI_strerror( -i );
        printf( "Error code %4d: %s\n", -i, errstr );
    }
    printf( "----------------------------------\n\n" );
    exit( 1 );
}

Here is the call graph for this function:


Variable Documentation

Definition at line 58 of file papi_internal.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines