[Numpy-discussion] Embedded NumPy LAPACK errors

Paul Anton Letnes paul.anton.letnes@gmail....
Sat Jan 5 04:42:13 CST 2013

On 4. jan. 2013, at 21:42, mw@eml.cc wrote:

> Hiall,
> I am trying to embed numerical code in a mexFunction,
> as called by MATLAB, written as a Cython function.
> NumPy core functions and BLAS work fine, but calls to LAPACK
> function such as SVD seem to be made against to MATLAB's linked
> MKL, and this generates MKL errors. When I try this with
> Octave, it works fine, presumably because it is compiled against
> the same LAPACK as the NumPy I am embedding.
> Assuming I haven't made big mistakes up to here, I have the
> following questions:
> Is there a way to request numpy.linalg to use a particular
> LAPACK library, e.g. /usr/lib/liblapack.so ?
> If not, is there a reasonable way to build numpy.linalg such that
> it interfaces with MKL correctly ?

It's possible, but it's much easier to install one of the pre-built python distributions. Enthought, WinPython and others include precompiled python/numpy/scipy/etc with MKL. If that works for you, I'd recommend that route, as it involves less work.

Good luck,

More information about the NumPy-Discussion mailing list