Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Forced kmpc_begin & kmpc_end ???

Aleksey_V_
Beginner
1,392 Views
Is there a way to disable forced call of these functions by ICC 9.1? My DLL project does not use any MKL functions, but it still depends on the libguide library and its __kmpc_begin() and __kmpc_end() functions. This causes me problems since my DLL is loaded together with other DLLs that do really require libguide40. I myself do not want to link against libguide40 since I do not need it at all, and I do not want to carry libguide40.dll dependency. My project is distributed globally so I cannot make any assumptions about environment it will be loaded in. So, I do really need to remove dependency on libguide COMPLETELY.

I find it strange that ICC adds these calls to my DllMain implicitly. This is a bit of a no-no to do from a professional tool.

Thank you for understanding.
0 Kudos
2 Replies
Aleksey_V_
Beginner
1,391 Views
I want to correct my assumptions. kmpc_begin and _end are really are symbols (pointers). I was able to define 'temporary' symbols with these names, but the actual function calls are still performed, so I cannot just set these vars to NULL. Beside that I'm not sure initialization performed in these functions is not required.

So, again, I need a complete dependency elimination.

Or, if technically possible, could you give a function prototype for these symbols?

This way it does not work:

extern "C" void (*__kmpc_begin) = __kmpc_emptyproc;
extern "C" void (*__kmpc_end) = __kmpc_emptyproc;
0 Kudos
Aleksey_V_
Beginner
1,391 Views
Sorry to bother. The issue has been resolved by removing the "/Qssp" flag from the compiler options.
0 Kudos
Reply