Blame man/man3/PAPI_perror.3

Packit 577717
.TH "PAPI_perror" 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_perror \- 
Packit 577717
.PP
Packit 577717
Produces a string on standard error, describing the last library error\&.  
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
 void \fBPAPI_perror( const char *s )\fP;
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBParameters:\fP
Packit 577717
.RS 4
Packit 577717
\fIs\fP -- Optional message to print before the string describing the last error message\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
The routine \fBPAPI_perror()\fP produces a message on the standard error output, describing the last error encountered during a call to PAPI\&. If s is not NULL, s is printed, followed by a colon and a space\&. Then the error message and a new-line are printed\&.
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
*
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
*     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_strerror\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\&.