which file contains the implementation of omp_get_thread_num

which file contains the implementation of omp_get_thread_num

Hello everyone. 

I am trying to find out where the implementation of omp_get_thread_num function is. I looked at several files such as kmp_csupport.c kmp_runtime.c but I have not found it. 

Thanks in advance for your help.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It is in kmp_ftn_entry.h, line 433.  It is called FTN_GET_THREAD_NUM, and at the build time gets the name omp_get_thread_num in the library. This is historical situation caused by the initial implementation of the library, when different entries existed for Fortran and for C/C++ applications. Nowadays Fortran codes use the same entries as C/C++, but to be compatible with ancient codes we still have older interfaces as well.


Got it. Thanks a lot.

Leave a Comment

Please sign in to add a comment. Not a member? Join today