[Numpy-discussion] Re: LAPACK question building numpy

Robert Kern robert.kern at gmail.com
Wed Apr 19 19:43:02 CDT 2006


Tom Denniston wrote:
> Is there a way to pass a command line argument to setup.py for numpy
> that does the equivalent of a make using the flags:
> -L/home/tdennist/lib -lmkl_lapack -lmkl_lapack32 -lmkl_ia32 -lmkl -lguide
> 
> All i can find on the subject is a page on the scipy wiki that says to
> use the variable LAPACK and set it to a .a file.  When I do so I get
> undefined symbol problems.
> 
> I this is probably really obvous and documented somewhere but I
> haven't been able to find it.  I don't really know where to look.

Don't worry, it's not really well documented. Create a file called site.cfg in
the root source directory. There's an example site.cfg.example there.
Unfortunately, it's pretty sparse at the moment. Now, I'm not terribly familiar
with the MKL, so I don't know what libraries do what, but here is my guess at
the appropriate things you will need in site.cfg:

[DEFAULT]
library_dirs=/home/tdennist/lib:/some/other/path/perhaps
include_dirs=/home/tdennist/include

[blas_opt]
libraries=whatever_the_mkl_blas_lib_is,mkl_ia32,mkl,guide

[lapack_opt]
libraries=mkl_lapack,mkl_lapack32,mkl_ia32,mkl,guide

There's some more documentation in numpy/distutils/system_info.py .

-- 
Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco





More information about the Numpy-discussion mailing list