Blame man/man3/PAPI_perror.3
Branch: 552d6d1af62cc0295a89fc10924aca25b9f08f2e
Packit Service
a1973e
.TH "PAPI_perror" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit Service
a1973e
.ad l
Packit Service
a1973e
.nh
Packit Service
a1973e
.SH NAME
Packit Service
a1973e
PAPI_perror \-
Packit Service
a1973e
.PP
Packit Service
a1973e
Produces a string on standard error, describing the last library error\&.
Packit Service
a1973e
Packit Service
a1973e
.SH SYNOPSIS
Packit Service
a1973e
.br
Packit Service
a1973e
.PP
Packit Service
a1973e
.SH "Detailed Description"
Packit Service
a1973e
.PP
Packit Service
a1973e
Packit Service
a1973e
.PP
Packit Service
a1973e
\fBC Interface:\fP
Packit Service
a1973e
.RS 4
Packit Service
a1973e
#include <\fBpapi\&.h\fP>
Packit Service
a1973e
.br
Packit Service
a1973e
void \fBPAPI_perror( const char *s )\fP;
Packit Service
a1973e
.RE
Packit Service
a1973e
.PP
Packit Service
a1973e
\fBParameters:\fP
Packit Service
a1973e
.RS 4
Packit Service
a1973e
\fIs\fP -- Optional message to print before the string describing the last error message\&.
Packit Service
a1973e
.RE
Packit Service
a1973e
.PP
Packit Service
a1973e
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 Service
a1973e
.PP
Packit Service
a1973e
\fBExample:\fP
Packit Service
a1973e
.RS 4
Packit Service
a1973e
Packit Service
a1973e
.PP
Packit Service
a1973e
.nf
Packit Service
a1973e
* int ret;
Packit Service
a1973e
* int EventSet = PAPI_NULL;
Packit Service
a1973e
* int native = 0x0;
Packit Service
a1973e
*
Packit Service
a1973e
* ret = PAPI_create_eventset(&EventSet);
Packit Service
a1973e
* if (ret != PAPI_OK)
Packit Service
a1973e
* {
Packit Service
a1973e
* fprintf(stderr, \"PAPI error %d: %s\\n\", ret, PAPI_strerror(retval));
Packit Service
a1973e
* exit(1);
Packit Service
a1973e
* }
Packit Service
a1973e
* // Add Total Instructions Executed to our EventSet
Packit Service
a1973e
* ret = PAPI_add_event(EventSet, PAPI_TOT_INS);
Packit Service
a1973e
* if (ret != PAPI_OK)
Packit Service
a1973e
* {
Packit Service
a1973e
* PAPI_perror( "PAPI_add_event" );
Packit Service
a1973e
* exit(1);
Packit Service
a1973e
* }
Packit Service
a1973e
* // Start counting
Packit Service
a1973e
* ret = PAPI_start(EventSet);
Packit Service
a1973e
* if (ret != PAPI_OK) handle_error(ret);
Packit Service
a1973e
*
Packit Service
a1973e
Packit Service
a1973e
.fi
Packit Service
a1973e
.PP
Packit Service
a1973e
.RE
Packit Service
a1973e
.PP
Packit Service
a1973e
\fBSee Also:\fP
Packit Service
a1973e
.RS 4
Packit Service
a1973e
\fBPAPI_strerror\fP
Packit Service
a1973e
.RE
Packit Service
a1973e
.PP
Packit Service
a1973e
Packit Service
a1973e
Packit Service
a1973e
.SH "Author"
Packit Service
a1973e
.PP
Packit Service
a1973e
Generated automatically by Doxygen for PAPI from the source code\&.