logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PAPI_strerror - Returns a string describing the PAPI error code.

Author

       Generated automatically by Doxygen for PAPI from the source code.

Version 7.1.0.0                                  Thu Dec 14 2023                                PAPI_strerror(3)

Detailed Description

CInterface:
           #include <papi.h>
            char * PAPI_strerror(interrorCode);

       Parameterscode
            -- the error code to interpret

       Returnvalues*error -- a pointer to the error string.
           NULL -- the input error code to PAPI_strerror() is invalid.

       PAPI_strerror() returns a pointer to the error message corresponding to the error code code. If the call
       fails the function returns the NULL pointer. This function is not implemented in Fortran.

       Example:

           int ret;
           int EventSet = PAPI_NULL;
           int native = 0x0;
           char error_str[PAPI_MAX_STR_LEN];

           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");
              fprintf(stderr,"PAPI_error %d: %s\n", ret, error_str);
              exit(1);
           }
           // Start counting
           ret = PAPI_start(EventSet);
           if (ret != PAPI_OK) handle_error(ret);

       SeealsoPAPI_perrorPAPI_set_optPAPI_get_optPAPI_shutdownPAPI_set_debug

Name

       PAPI_strerror - Returns a string describing the PAPI error code.

Synopsis

See Also