Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

When using IPP 6.0 I get, "OMP abort: Initializing libguide40.dll, but found libiomp5md.dll already initialized."

lamoid
Beginner
579 Views

Dear Folks,

I am using IPP v6.0 mostly with OpenCV v1.1.1a (but also on its own) under Windows XP Professional 64 SP2 on a Xeon E5420 Harpertown quadcore (EM64T). I am using VC++ 8.0 from Visual Studio 2005 to create my programs. I was using IPP v5.3 successfully with my code. Now that I have upgraded to IPP v6.0, I am having problems.

My programs compile and link successfully both in debug and release mode (x64). When I run them, however, I get the following errors.

Release x64:
OMP abort: Initializing libguide40.dll, but found libiomp5md.dll already initialized. 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 contact Intel Premier Support. [I have done so]

Debug x64:

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem. [What a useless error message!]


I have searched the internet and the Intel site to try to find answers, but nothing I've done has worked. I have set up my environment as follows:

CPATH=C:\Program Files\Intel\IPP\6.0.0.062\em64t\include
include=C:\Program Files\Intel\IPP\6.0.0.062\em64t\include; ...
INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses
IPPROOT=C:\Program Files\Intel\IPP\6.0.0.062\em64t
lib=C:\Program Files\Intel\IPP\6.0.0.062\em64t\lib;C:\Program Files\Intel\IPP\6.0.0.062\em64t\stublib; ...
Path=C:\Program Files\Intel\IPP\6.0.0.062\em64t\bin; ...

All the IPP refs are first. I've used the following compiler flags as recommended:

/I "C:\Program Files\Intel\IPP\6.0.0.062\em64t\include"
/MD
/openmp
/Qopenmp-lib:compat
/Qopenmp-link:dynamic

The IPP include is first in the list. VC++ 8.0 does not recognize the options "/Qopenmp-lib:compat" and "/Qopenmp-link:dynamic", and therefore ignores them.

And the following linker flags:

/LIBPATH:"C:\Program Files\Intel\IPP\6.0.0.062\em64t\stublib"
/LIBPATH:"C:\Program Files\Intel\IPP\6.0.0.062\em64t\lib"
/LIBPATH:"C:\Program Files\Intel\IPP\6.0.0.062\em64t\bin"
/NODEFAULTLIB:"libguide.dll"
/NODEFAULTLIB:"libguide.lib"
/NODEFAULTLIB:"libguide40.dll"
/NODEFAULTLIB:"libguide40.lib"
/MD
/Qopenmp-link:dynamic

The IPP library paths are first in the list. The linker does not recognize "/Qopenmp-link:dynamic" and ignores it. Also the inputs to the linker are, in this order:

libiomp5md.lib
ippacem64t.lib
ippccem64t.lib
ippchem64t.lib
ippcoreem64t.lib
ippcvem64t.lib
ippdcem64t.lib
ippdiem64t.lib
ippgenem64t.lib
ippiem64t.lib
ippjem64t.lib
ippmem64t.lib
ipprem64t.lib
ippscem64t.lib
ippsem64t.lib
ippsrem64t.lib
ippvcem64t.lib
ippvmem64t.lib
quartz.lib
dscam.lib
thcam.lib
cvcam.lib
cv_64.lib
highgui_64.lib
cxcore_64.lib
winmm.lib
strmbase.lib
cvaux_64.lib
comctl32.lib

I neither know what I am doing wrong nor do I know what to try next. Thank you for your help.

Alan Peters

0 Kudos
6 Replies
Vladimir_Dudnik
Employee
579 Views
Hello,
the problem is that IPP 6.0 waslinked with libiomp5 but OpenCV waslinked with libguide40. To solve this you need to recompile OpenCV and link it with either libiomp5 or with MS libomp.
You may find some related info in IPP Knowledge Base articles.
Note, libiomp5 is new Intel OpenMP run time library which is compatible with Microsoft OpenMP run time (what is not a case for the previous Intel OpenMP run time library, libguide40). The old Intel OpenMP run time library will be deprecetaed in the future Intel Compiler releases so you will need to migrate to libiomp5 anyway.
Regards,
Vladimir

0 Kudos
lamoid
Beginner
579 Views
Quoting - vdudn

Thank you, Vladimir, for your response to my post. In fact, I completely rebuilt OpenCV using the parameters I listed in my first post. I have not been able to figure out what module is trying to load libguide40. I searched for it using DependencyWalker [I looked with my eyes. Apparently DW does not have a search feature :( ] but I did not find it among the modules there. Would any of you know how to figure out which module is actually trying to load libguide40? That would be a good place for me to start.

--Alan

Hello,
the problem is that IPP 6.0 waslinked with libiomp5 but OpenCV waslinked with libguide40. To solve this you need to recompile OpenCV and link it with either libiomp5 or with MS libomp.
You may find some related info in IPP Knowledge Base articles.
Note, libiomp5 is new Intel OpenMP run time library which is compatible with Microsoft OpenMP run time (what is not a case for the previous Intel OpenMP run time library, libguide40). The old Intel OpenMP run time library will be deprecetaed in the future Intel Compiler releases so you will need to migrate to libiomp5 anyway.
Regards,
Vladimir

0 Kudos
Vladimir_Dudnik
Employee
579 Views
You will not find libguide40 name in sources. Please check OpenCV makefile where it link libguide40 library.

0 Kudos
matthieu_darbois
New Contributor III
579 Views
Quoting - vdudnik
You will not find libguide40 name in sources. Please check OpenCV makefile where it link libguide40 library.

Hi,

If you're application links with some modules of ipp6.0 and openCV there's a bug in OpenCV which could fail to load ipp6.0 when searching for optimized modules.

In that case, if you have ipp5.x installed, openCV could be trying to load these dlls along with libguide40.dll. This won't show up in DW because these libraries are loaded with LoadLibrary and thus are not linked in...

Regards,

Matthieu

0 Kudos
lamoid
Beginner
579 Views
Thanks for your reply, Matthieu. Do you know what that bug is? I simply cannot run any of my programs that use both opencv and ipp due to the program error I mentioned above. I spent several days rebuilding all the OpenCV programs and specified that libguide.dll and libguide40.dll be ignored by every program, but that has not solved the problem. Dependency walker's profile mode shows quite a few errors, all but one of them being "the system cannot find the file specified." It looks like those all get resolved but I'm unsure about that. The profile fianlly aborts with the following second chance exception:

DllMain(0x0000000010200000, DLL_PROCESS_DETACH, 0x0000000000000001) in "c:windowswinsxsamd64_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_869ab37fMSVCR80D.DLL" called.

Second chance exception 0xC0000005 (Access Violation) occurred in "c:windowswinsxsamd64_microsoft.vc80.debugmfc_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_57812684MFC80D.DLL" at address 0x000000007827E692.

Exited "d:programsvisual studio 2005projectscvstereoframeworkx64debugSTEREOFRAMEWORKD_64.EXE" (process 0xCBD4) with code 128 (0x80).

MSVCR80D.DLL is the debug version of the MS C runtime library and MFC80D.DLL is debug version of the MS foundation classes. I do not know if these are related to the OpenMP library mismatches or not. The failure may occur there only indirectly.

This is frustrating! Any clues or ideas from anyone reading this will be much appreciated!

Thanks

Alan Peters

Hi,

If you're application links with some modules of ipp6.0 and openCV there's a bug in OpenCV which could fail to load ipp6.0 when searching for optimized modules.

In that case, if you have ipp5.x installed, openCV could be trying to load these dlls along with libguide40.dll. This won't show up in DW because these libraries are loaded with LoadLibrary and thus are not linked in...

Regards,

Matthieu

0 Kudos
matthieu_darbois
New Contributor III
579 Views

Hi,

You could check easily if the error is really due to OpenCV.

As I understand, you compiled OpenCV by yourself so the test will be easy. Just modify cxswitcher.cpp in cxcore so that VERBOSE_LOADING is defined to 1 (instead of 0) then compile cxcore and cxcoretest. You'll then see what optimized modules are loaded. If anything other version than ipp 6.0 loads then the issue is here.

If that's the case, I can provide you with a workaround for cxswitcher which is far from optimal (some optimized libraries won't load despite the fact they're present).

Regards,

Matthieu

0 Kudos
Reply