Parallel static link to IPP uses libiomp5mt.lib and causes OMP: Error #15.

Parallel static link to IPP uses libiomp5mt.lib and causes OMP: Error #15.

I have application and dll both linking IPP statically with _IPP_PARALLEL_STATIC macro. Dll is linked statically via .lib-file into application and I have this error message at startup:

OMP: Error #15: Initializing libiomp5mt.lib, but found libiomp5mt.lib already initialized.
OMP: Hint: This may cause performance degradation and correctness issues. Set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore this problem and force the program to continue anyway. Please note that the use of KMP_DUPLICATE_LIB_OK is unsupported and using it may cause undefined behavior. For more information, please see http://www.intel.com/software/products/support/.

Previously I used linkage with _IPP_SEQUENTIAL_STATIC macro and there was no such problem since both app and dll used OMP in libiomp5md.dll. But it seems like IPP have implicitly switched to static OMP initialization after defining _IPP_PARALLEL_STATIC macro.

How am I supposed to resolve this issue? Dynamic version of OMP in libiomp5md.dll is what I want continue to use.

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

This solution worked fine for me. And since it was given by Intel staff, I assume this is the best I can get.

Leave a Comment

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