1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
.TH "PAPI_perror" 3 "Mon Jun 30 2014" "Version 5.3.2.0" "PAPI" \" -*- nroff -*-
.ad l
.nh
.SH NAME
PAPI_perror \-
.PP
Produces a string on standard error, describing the last library error\&.
.SH SYNOPSIS
.br
.PP
.SH "Detailed Description"
.PP
.PP
\fBC Interface:\fP
.RS 4
#include <\fBpapi\&.h\fP>
.br
void \fBPAPI_perror( char *s )\fP;
.RE
.PP
\fBParameters:\fP
.RS 4
\fIs\fP -- Optional message to print before the string describing the last error message\&.
.RE
.PP
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\&.
.PP
\fBExample:\fP
.RS 4
.PP
.nf
* int ret;
* int EventSet = PAPI_NULL;
* int native = 0x0;
*
* ret = PAPI_create_eventset(&EventSet);
* if (ret != PAPI_OK)
* {
* fprintf(stderr, \"PAPI error %d: %s\\n\", ret, PAPI_strerror(retval));
* exit(1);
* }
* // Add Total Instructions Executed to our EventSet
* ret = PAPI_add_event(EventSet, PAPI_TOT_INS);
* if (ret != PAPI_OK)
* {
* PAPI_perror( "PAPI_add_event" );
* exit(1);
* }
* // Start counting
* ret = PAPI_start(EventSet);
* if (ret != PAPI_OK) handle_error(ret);
*
.fi
.PP
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBPAPI_strerror\fP
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for PAPI from the source code\&.
|