papi_set_debug(3) - Linux man page
Name
PAPI_set_debug - set the current debug level for PAPISynopsis
C Interface#include <papi.h>int PAPI_set_debug(int debuglevel);Fortran Interface
#include "fpapi.h"PAPIF_set_debug(C_INT debug, C_INT check)
Description
PAPI_set_debug sets the debug level for error output from the PAPI library.Arguments
The PAPI error handler prints out messages in the following form:
PAPI Error: message.
The default PAPI debug handler prints out messages in the following form:
PAPI Error: Error Code code,symbol,description
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.
The possible debug levels for debugging are shown in the table below.
| PAPI_QUIET | Do not print anything, just return the error code |
| PAPI_VERB_ECONT | Print error message and continue |
| PAPI_VERB_ESTOP | Print error message and exit |
Return Values
On success, this function returns PAPI_OK. On error, a non-zero error code is returned.Errors
- PAPI_EINVAL
- The debuglevel is invalid.
Examples
if ( PAPI_set_debug(PAPI_VERB_ECONT) != PAPI_OK ) handle_error();