PAPIC:PAPI set debug.3
#include <papi.h> int PAPI_set_debug(int debuglevel );
#include fpapi.h PAPIF_set_debug(C_INT debug, C_INT check )
PAPI_set_debug sets the debug level for error output from the PAPI library.
debuglevel -- one of the constants shown in the table below and defined in the papi.h header file. The current debug level is used by both the internal error and debug message handler subroutines. The debug handler is only used if the library was compiled with -DDEBUG. The debug handler is called when there is an error upon a call to the PAPI API. The error handler is always active and it's behavior cannot be modified except for whether or not it prints anything. NOTE: This is the ONLY function that may be called BEFORE PAPI_library_init(). 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_EINVAL The debuglevel is invalid.
if ( PAPI_set_debug(PAPI_VERB_ECONT) != PAPI_OK ) handle_error();
This function has no known bugs.