PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PAPI_unregister_thread Class Reference

Notify PAPI that a thread has 'disappeared'. More...

Detailed Description

Return values
PAPI_ENOMEMSpace could not be allocated to store the new thread information.
PAPI_ESYSA system or C library call failed inside PAPI, see the errno variable.
PAPI_ECMPHardware counters for this thread could not be initialized.

PAPI_unregister_thread should be called when the user wants to shutdown a particular thread and free the associated thread ID. THIS IS IMPORTANT IF YOUR THREAD LIBRARY REUSES THE SAME THREAD ID FOR A NEW KERNEL LWP. OpenMP does this. OpenMP parallel regions, if separated by a call to omp_set_num_threads() will often kill off the underlying kernel LWPs and then start new ones for the next region. However, omp_get_thread_id() does not reflect this, as the thread IDs for the new LWPs will be the same as the old LWPs. PAPI needs to know that the underlying LWP has changed so it can set up the counters for that new thread. This is accomplished by calling this function.


The documentation for this class was generated from the following file: