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.
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.