I was writing a new runtime routine to integrate with intel openMP runtime. My function call is pretty like the calling of, “omp_set_num_threads(4);”
my goal here is to set/provide (to runtime) a integer value and an address location through runtime routine call.
What I did:
I have made a shadow copy like the omp_set_num_thread() function implementation; it generates the function prototype as below in the omp.h header file:
extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
extern void __KAI_KMPC_CONVENTION omp_set_data_bind (void *);
extern void __KAI_KMPC_CONVENTION omp_set_my_threads (int);
and in my program I am calling like:
#pragma omp parallel
At a guess you’re not linking against the runtime you have modified.
Check exactly which shared library is being linked, and then use nm on it to see what symbols it contains.
As a second, stylistic, issue: please don’t name your new, non-standard function “omp_anything”. Such names should be reserved for functions from the OpenMP standard. Historically other, non-standard, entrypoints to the runtime have used the “kmp_” prefix. Either use that, or choose your own, but having non-standard functionality appear to be standard is asking for trouble.
James Cownie email@example.com
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438
Thank you very much for your reply.
If I am right to address as you said -
the shared library is being linked is: -L/home/XXX/opt/libomp_oss/exports/lin_32e/lib/ -L. -liomp5
Running nm command on libiomp5.so shows: (same symbol format as for omp_set_num_threads runtime routine call)
000000000001b380 t __kmp_api_omp_set_my_threads
000000000001c050 t _**kmp_api_omp_set_my_threads**
and my runtime gets linked and it reflects the modifications.
Secondly, about stylistic issue: yes I will definitely follow the standard practice. thanks again for your nice explanations.
One more thing, I am just wondering: I see in intel openMP source code contains a file name <dllexports> where dllexports file contains,
Deprecated entry points (numbers are reserved):
Is this something significant, I need to care about…?
Appreciate your invaluable feedback.