BLAS version problem from mex / coder?
4 views (last 30 days)
Show older comments
Hi, I am trying to call some legacy c libraries from a Coder generated mex. The libraries are precompiled, and when I test my code as standalone C they work just fine.
What I'm trying to do is call this from my Matlab program, using coder and the 'coder.cinclude..' option. This compiles and builds just fine, but when I try to run the full test problem it hangs with the error....
"Intel MKL ERROR: Parameter 18 was incorrect on entry to DSYEVR."
.... and the whole thing just hangs. Googling around I find that this is usually a BLAS/Lapack problem.
Checking the versions of blas and lapack in Matlab I get....
>> version -blas
Intel® Math Kernel Library Version 11.3.1 Product Build 20151021 for Intel® 64 architecture applications, CNR branch AVX2
>> version -lapack
Intel® Math Kernel Library Version 11.3.1 Product Build 20151021 for Intel® 64 architecture applications, CNR branch AVX2 Linear Algebra PACKage Version 3.5.0
And on my system....
[xxx]$ locate blas
/usr/lib64/libblas.so /usr/lib64/libblas.so.3 /usr/lib64/libblas.so.3.4 /usr/lib64/libblas.so.3.4.2 /usr/lib64/libblas64.so.3 /usr/lib64/libblas64.so.3.4 /usr/lib64/libblas64.so.3.4.2 ..etc
[xxxx]$ locate lapack
/usr/lib64/liblapack.so /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so.3.4 /usr/lib64/liblapack.so.3.4.2 /usr/lib64/liblapack64.so.3 /usr/lib64/liblapack64.so.3.4 /usr/lib64/liblapack64.so.3.4.2 /usr/lib64/liblapacke.so /usr/lib64/liblapacke.so.3 /usr/lib64/liblapacke.so.3.4 /usr/lib64/liblapacke.so.3.4.2
So, the external .so will have been compiled using 3.4.2, whereas Matlab (and I assume Coder) wants to use 3.5. So I have two questions...
(a) Is it likely that the difference ins blas/lapack versions between the compiled library and Matlab could be the cause of the problem? (b) If so, should I either down-version the Matlab install to 3.4.2, (c) ..or upgrade my Linux version to 3.5 and try to recompile the toolbox? (d) None of the above and do something else?
Any advice would be great as I'm quite stuck here.
p.s. I don't know how to do either (b) or (c) tbh....]
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!