Blame man/man3/PAPI_strerror.3

Packit 577717
.TH "PAPI_strerror" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit 577717
.ad l
Packit 577717
.nh
Packit 577717
.SH NAME
Packit 577717
PAPI_strerror \- 
Packit 577717
.PP
Packit 577717
Returns a string describing the PAPI error code\&.  
Packit 577717
Packit 577717
.SH SYNOPSIS
Packit 577717
.br
Packit 577717
.PP
Packit 577717
.SH "Detailed Description"
Packit 577717
.PP 
Packit 577717
Packit 577717
.PP
Packit 577717
\fBC Interface:\fP
Packit 577717
.RS 4
Packit 577717
#include <\fBpapi\&.h\fP> 
Packit 577717
.br
Packit 577717
 char * \fBPAPI_strerror( int errorCode )\fP;
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBParameters:\fP
Packit 577717
.RS 4
Packit 577717
\fIcode\fP -- the error code to interpret
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBReturn values:\fP
Packit 577717
.RS 4
Packit 577717
\fI*error\fP -- a pointer to the error string\&. 
Packit 577717
.br
Packit 577717
\fINULL\fP -- the input error code to \fBPAPI_strerror()\fP is invalid\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBPAPI_strerror()\fP returns a pointer to the error message corresponding to the error code code\&. If the call fails the function returns the NULL pointer\&. This function is not implemented in Fortran\&.
Packit 577717
.PP
Packit 577717
\fBExample:\fP
Packit 577717
.RS 4
Packit 577717
Packit 577717
.PP
Packit 577717
.nf
Packit 577717
*  int ret;
Packit 577717
*  int EventSet = PAPI_NULL;
Packit 577717
*  int native = 0x0;
Packit 577717
*  char error_str[PAPI_MAX_STR_LEN];
Packit 577717
*
Packit 577717
*  ret = PAPI_create_eventset(&EventSet);
Packit 577717
*  if (ret != PAPI_OK)
Packit 577717
*  {
Packit 577717
*     fprintf(stderr, "PAPI error %d: %s\n", ret, PAPI_strerror(retval));
Packit 577717
*     exit(1);
Packit 577717
*  }
Packit 577717
*  // Add Total Instructions Executed to our EventSet
Packit 577717
*  ret = PAPI_add_event(EventSet, PAPI_TOT_INS);
Packit 577717
*  if (ret != PAPI_OK)
Packit 577717
*  {
Packit 577717
*     PAPI_perror( "PAPI_add_event");
Packit 577717
*     fprintf(stderr,"PAPI_error %d: %s\n", ret, error_str);
Packit 577717
*     exit(1);
Packit 577717
*  }
Packit 577717
*  // Start counting
Packit 577717
*  ret = PAPI_start(EventSet);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  
Packit 577717
Packit 577717
.fi
Packit 577717
.PP
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBSee Also:\fP
Packit 577717
.RS 4
Packit 577717
\fBPAPI_perror\fP \fBPAPI_set_opt\fP \fBPAPI_get_opt\fP \fBPAPI_shutdown\fP \fBPAPI_set_debug\fP 
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
Packit 577717
Packit 577717
.SH "Author"
Packit 577717
.PP 
Packit 577717
Generated automatically by Doxygen for PAPI from the source code\&.