|
Packit |
577717 |
.TH "PAPI_set_debug" 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_set_debug \-
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
Set the current debug level for error output from PAPI\&.
|
|
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 Prototype:\fP
|
|
Packit |
577717 |
.RS 4
|
|
Packit |
577717 |
#include <\fBpapi\&.h\fP>
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
int \fBPAPI_set_debug( int level )\fP;
|
|
Packit |
577717 |
.RE
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBParameters:\fP
|
|
Packit |
577717 |
.RS 4
|
|
Packit |
577717 |
\fIlevel\fP one of the constants shown in the table below and defined in the \fBpapi\&.h\fP header file\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
The possible debug levels for debugging are shown below\&.
|
|
Packit |
577717 |
.PD 0
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.IP "\(bu" 2
|
|
Packit |
577717 |
PAPI_QUIET Do not print anything, just return the error code
|
|
Packit |
577717 |
.IP "\(bu" 2
|
|
Packit |
577717 |
PAPI_VERB_ECONT Print error message and continue
|
|
Packit |
577717 |
.IP "\(bu" 2
|
|
Packit |
577717 |
PAPI_VERB_ESTOP Print error message and exit
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.RE
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBReturn values:\fP
|
|
Packit |
577717 |
.RS 4
|
|
Packit |
577717 |
\fIPAPI_OK\fP
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
\fIPAPI_EINVAL\fP The debug level is invalid\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
The current debug level is used by both the internal error and debug message handler subroutines\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
The debug handler is only used if the library was compiled with -DDEBUG\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
The debug handler is called when there is an error upon a call to the PAPI API\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
The error handler is always active and its behavior cannot be modified except for whether or not it prints anything\&.
|
|
Packit |
577717 |
.RE
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
The default PAPI debug handler prints out messages in the following form:
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
PAPI Error: Error Code code, symbol, description
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
If the error was caused from a system call and the return code is PAPI_ESYS, the message will have a colon space and the error string as reported by strerror() appended to the end\&.
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
The PAPI error handler prints out messages in the following form:
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
PAPI Error: message\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBNote:\fP
|
|
Packit |
577717 |
.RS 4
|
|
Packit |
577717 |
This is the ONLY function that may be called BEFORE \fBPAPI_library_init()\fP\&.
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.RE
|
|
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 |
ret = PAPI_set_debug(PAPI_VERB_ECONT);
|
|
Packit |
577717 |
if ( ret != PAPI_OK ) handle_error();
|
|
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_library_init\fP
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBPAPI_get_opt\fP
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBPAPI_set_opt\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\&.
|