Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Error in blas/lapack when linking to external library using mex

$
0
0
"Vincent" wrote in message <kng43m$idl$1@newscl01ah.mathworks.com>...
> "Nasser M. Abbasi" wrote in message <knfaug$pa8$1@speranza.aioe.org>...
> > On 5/21/2013 3:12 AM, Vincent wrote:
> >
> > > Any suggestions on what might cause this error? Does matlab link to a proprietary blas/lapack library?
> > >
> >
> > Matlab uses mkl
> >
> > EDU>> version -lapack
> >
> > ans =
> >
> > Intel(R) Math Kernel Library Version 10.3.11 Product Build 20120606 for 32-bit applications
> > Linear Algebra PACKage Version 3.4.1
> >
> > see also:
> >
> > http://en.wikipedia.org/wiki/Math_Kernel_Library
> >
> > "Intel's Math Kernel Library (MKL) is a library of optimized
> > math routines for science, engineering, and financial applications.
> > Core math functions include BLAS, LAPACK, ScaLAPACK, sparse solvers,
> > fast Fourier transforms, and vector math."
> >
> > --Nasser
>
> Ok, thanks. I now believe the error is probably related to a typecheck the external library is making. I'll see if I can get a hand on the source code to look into this possibility.

Just making a guess without seeing the code, but one place to look is the types of the integer(s) being passed into the BLAS and LAPACK routines. Do they need to be 4-byte or 8-byte integers? When writing mex files linking to the MATLAB supplied libraries one can conveniently use the mwSignedIndex type to make sure things match up. If you are doing anything else then you may have to manually adjust things in the code to make sure the types match up to what the routines are expecting.

James Tursa

Viewing all articles
Browse latest Browse all 19628

Trending Articles