- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am having spurious errors with IPP in combinations with Matlab (on Linux). It seems to be connected to the linking process. For testing purposes, I've created a virtually empty c++ file (ippitestlink.cpp):
#include "mex.h"
#include "/opt/intel/ipp/5.1/ia32/include/ipp.h"
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
}
If I then run
mex -v ippitestlink.cpp -L/opt/intel/ipp/5.1/ia32/lib/ -L/opt/intel/ipp/5.1/ia32/sharedlib/
run matlab and call the routine, everything is ok. However, if I
call
mex -v ippitestlink.cpp -L/opt/intel/ipp/5.1/ia32/lib/ -L/opt/intel/ipp/5.1/ia32/sharedlib/ -lippi
run matlab and call the routine, matlab refuses to gracefully exit afterwards. So, given that it is related to the linking process, what can be wrong? The commands run by the above mex call are
-> g++-3.3 -c -I/usr/local/matlab7p1/extern/include -DMATLAB_MEX_FILE -fPIC -ansi -D_GNU_SOURCE -pthread -O -DNDEBUG ippitestlink.cpp
-> gcc-3.3 -c -I/usr/local/matlab7p1/extern/include -DMATLAB_MEX_FILE -fPIC -ansi -D_GNU_SOURCE -pthread -fexceptions -m32 -O -DNDEBUG /usr/local/matlab7p1/extern/src/mexversion.c
-> g++-3.3 -O -pthread -shared -m32 -Wl,--version-script,/usr/local/matlab7p1/extern/lib/glnx86/mexFunction.map -o ippitestlink.mexglx ippitestlink.o mexversion.o -L/opt/intel/ipp/5.1/ia32/lib/ -L/opt/intel/ipp/5.1/ia32/sharedlib/ -lippi -Wl,-rpath-link,/usr/local/matlab7p1/bin/glnx86 -L/usr/local/matlab7p1/bin/glnx86 -lmx -lmex -lmat -lm -lm
Is there something wrong with these calls to gcc/g++? (I've tried 3.4 and 4.1 as well, with the same results.)
I have been trying to fix this Matlab / IPP interoperability stuff for quite some time now, so I really appreciate any help!
Thanks,
Koen
I am having spurious errors with IPP in combinations with Matlab (on Linux). It seems to be connected to the linking process. For testing purposes, I've created a virtually empty c++ file (ippitestlink.cpp):
#include "mex.h"
#include "/opt/intel/ipp/5.1/ia32/include/ipp.h"
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
}
If I then run
mex -v ippitestlink.cpp -L/opt/intel/ipp/5.1/ia32/lib/ -L/opt/intel/ipp/5.1/ia32/sharedlib/
run matlab and call the routine, everything is ok. However, if I
call
mex -v ippitestlink.cpp -L/opt/intel/ipp/5.1/ia32/lib/ -L/opt/intel/ipp/5.1/ia32/sharedlib/ -lippi
run matlab and call the routine, matlab refuses to gracefully exit afterwards. So, given that it is related to the linking process, what can be wrong? The commands run by the above mex call are
-> g++-3.3 -c -I/usr/local/matlab7p1/extern/include -DMATLAB_MEX_FILE -fPIC -ansi -D_GNU_SOURCE -pthread -O -DNDEBUG ippitestlink.cpp
-> gcc-3.3 -c -I/usr/local/matlab7p1/extern/include -DMATLAB_MEX_FILE -fPIC -ansi -D_GNU_SOURCE -pthread -fexceptions -m32 -O -DNDEBUG /usr/local/matlab7p1/extern/src/mexversion.c
-> g++-3.3 -O -pthread -shared -m32 -Wl,--version-script,/usr/local/matlab7p1/extern/lib/glnx86/mexFunction.map -o ippitestlink.mexglx ippitestlink.o mexversion.o -L/opt/intel/ipp/5.1/ia32/lib/ -L/opt/intel/ipp/5.1/ia32/sharedlib/ -lippi -Wl,-rpath-link,/usr/local/matlab7p1/bin/glnx86 -L/usr/local/matlab7p1/bin/glnx86 -lmx -lmex -lmat -lm -lm
Is there something wrong with these calls to gcc/g++? (I've tried 3.4 and 4.1 as well, with the same results.)
I have been trying to fix this Matlab / IPP interoperability stuff for quite some time now, so I really appreciate any help!
Thanks,
Koen
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also tried an alternative route. Matlab allows you to load a shared library from within the Matlab program. As a quick test, I did:
loadlibrary('/opt/intel/ipp/5.1/ia32/sharedlib/libippi.so','/opt/intel/ipp/5.1/ia32/include/ippi.h')
unloadlibrary('libippi');
and I quit the Matlab desktop. Same error: No clean exit, but an 'Aborted' or 'Killed' statement on the bash prompt.
Could there be something with the libraries Matlab uses and the ones IPP uses that just doesn't work together? Maybe same libraries but different versions? How could I check this?
Koen
loadlibrary('/opt/intel/ipp/5.1/ia32/sharedlib/libippi.so','/opt/intel/ipp/5.1/ia32/include/ippi.h')
unloadlibrary('libippi');
and I quit the Matlab desktop. Same error: No clean exit, but an 'Aborted' or 'Killed' statement on the bash prompt.
Could there be something with the libraries Matlab uses and the ones IPP uses that just doesn't work together? Maybe same libraries but different versions? How could I check this?
Koen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Koen,
The IPP was developed to minimize use of other libraries, only malloc/free is used from CRT libs, andprobably some mathemathic functions from Intel CRT libraries (part of Intel Compiler package).
I've looked trough posts on forum for similar issue (basicall search for Matlab keyword), you might be interested with looking at the following topics:
load library
OpenCV and IPP Conflict
Entry Point Not Found in ippi20.dll
BTW, what Matlab technical support said on this?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
Thanks for the search. I found those as well, and it doesn't really give a workable solution. I guess part of the problem is that Matlab ships with IPP 2.0. In addition, they support very specific versions of gcc and libc6 (glibc). So it's pretty difficult to find out what exactly goes wrong. I have already asked them whether they will support more recent versions of IPP, and they tell that IPP support is 'under review'. So that doesn't give me much to go on.
I can try removing all libraries that might conflict, but it's just a shot in the dark... I'd really like to use Matlab with (new versions of) IPP!
Koen
Thanks for the search. I found those as well, and it doesn't really give a workable solution. I guess part of the problem is that Matlab ships with IPP 2.0. In addition, they support very specific versions of gcc and libc6 (glibc). So it's pretty difficult to find out what exactly goes wrong. I have already asked them whether they will support more recent versions of IPP, and they tell that IPP support is 'under review'. So that doesn't give me much to go on.
I can try removing all libraries that might conflict, but it's just a shot in the dark... I'd really like to use Matlab with (new versions of) IPP!
Koen

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page