PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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.

35 {
36  int i=0;
37  int retval;
38 
39  tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
40 
41  if ( ( retval =
43  test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );
44 
45 
46  printf( "\n----------------------------------\n" );
47  printf( "For PAPI Version: %d.%d.%d.%d\n",
52  printf( "----------------------------------\n" );
53  while ( 1 ) {
54  char *errstr;
55  errstr = PAPI_strerror( -i );
56 
57  if ( NULL == errstr ) {
58  break;
59  }
60 
61  printf( "Error code %4d: %s\n", -i, errstr );
62  i++;
63  }
64  printf( "There are %d error codes defined\n", i );
65  printf( "----------------------------------\n\n" );
66  exit( 1 );
67 }
tests_quiet(argc, argv)
#define printf
Definition: papi_test.h:125
int int argc
Definition: iozone.c:1609
char ** argv
Definition: iozone.c:1610
test_fail(__FILE__, __LINE__,"PAPI_library_init", retval)
int PAPI_library_init(int version)
Definition: papi.c:497
int i
Definition: fileop.c:140
#define PAPI_VERSION_MAJOR(x)
Definition: papi.h:215
#define PAPI_VERSION_REVISION(x)
Definition: papi.h:217
#define PAPI_VERSION_MINOR(x)
Definition: papi.h:216
#define PAPI_VERSION
Definition: papi.h:222
char * PAPI_strerror(int errorCode)
Definition: papi.c:4529
ssize_t retval
Definition: libasync.c:338
#define PAPI_VER_CURRENT
Definition: papi.h:223
#define PAPI_VERSION_INCREMENT(x)
Definition: papi.h:218
void exit()

Here is the call graph for this function: