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

runtime error in matlab mex with lnked with ipp

Christopher_W_
Beginner
712 Views

Hi,
   I can compile and link my mex program. However, when I try to run it through a matlab program, I get

Invalid MEX-file 'D:my_mex.mexw64': The specified module could not be found.

This must be a problem with the calls to the ipp library as when I remove them, it does not crash.

I am using Windows 7 and compiling via the compiler:

Intel C++ 13.0 in %ICPP_COMPILER13%

my compile line is matlab is:

mex -v -g my_mex.cpp -L"C:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\intel64"  -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lmkl_cdft_core  -lmkl_intel_thread -L"C:\Program Files (x86)\Intel\Composer XE 2013\ipp\lib\intel64" -lippm -lippm_l

Does anyone have any suggestions?

Thanks

Chris

0 Kudos
5 Replies
SergeyKostrov
Valued Contributor II
712 Views
Please verify that runtime DLLs for IPP and MKL could be found. That is, there are right search paths in PATH environment variable.
0 Kudos
Christopher_W_
Beginner
712 Views

Hi Sergey,
It seemed as if we were missing the file: libiomp5md.dll. After attempting a re-install of the Intel Composer 2013 version 7.1, this file now appears to be there. We did check the ipp and mkl paths which are currently set to:
%INTEL_DEV_REDIST%redist\intel64\compiler;%INTEL_DEV_REDIST%redist\ia32\compiler;%INTEL_DEV_REDIST%redist\intel64\ipp;%INTEL_DEV_REDIST%redist\ia32\ipp;

with INTEL_DEV_REDIST set to:
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\

The error I now get is:
Invalid MEX-file 'D:\my_mex.mexw64': A dynamic link library (DLL) initialization routine failed.

Thanks
Chris

 

0 Kudos
SergeyKostrov
Valued Contributor II
712 Views
>>The error I now get is: >>Invalid MEX-file 'D:\my_mex.mexw64': A dynamic link library (DLL) initialization routine failed. There are also CPU dispatching DLLs for IPP and MKL ( also known as Waterfall DLLs ) and when at least one of these DLLs is Not found application won't start. I'm confident that you still have DLL dependencies problem and use MS Depends to verify.
0 Kudos
Christopher_W_
Beginner
712 Views

OK, I compiled using every static library:
mex -v -g my_mex.cpp -L"C:\Program Files (x86)\Intel\Composer XE 2013\mkl\lib\intel64"  -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lmkl_cdft_core -lmkl_intel_thread -L"C:\Program Files (x86)\Intel\Composer XE 2013\ipp\lib\intel64" -lippm_l -lippac_l -lippcc_l -lippch_l -lippcore_l -lippcv_l -lippdc_l -lippdi_l -lippdj_l -lippr_l -lipps_l -lippsc_l -lippvc_l -lippvm_l

and it seems to get over the dll issues. Not sure if I really need all those libraries, but it seems to work.

Thanks, Chris

0 Kudos
Igor_A_Intel
Employee
712 Views

Hi Chris,

IPP hierarchy is the next: all IPP domains (libraries) are based on ippCore library, so when you linked with ippm domain (small matrix) you also should add ippcore. It's nothing wrong when linking statically to define all ipp libraries in the cmd line - linker will link only those obj that are used in your app.

Regards, Igor

0 Kudos
Reply