[Numpy-discussion] building numpy/scipy

Matthieu Brucher matthieu.brucher at gmail.com
Fri Jan 2 13:45:29 EST 2009


2009/1/2 Mike Landis <mlandis001 at comcast.net>:
> Some of the install instructions are kind of ambiguous.
>
> When a library name ends in .a or .dll, it's obvious what it is, but
> 'library' is sometimes used generically without indicating whether
> you're talking about static or dynamic, e.g. how does numpy/scipy
> link to MKL?  Is it statically or dynamically linked?

If the dynamic libraries are available, they are used.

> It's not clear where things should go or how things are found.  After
> downloading numpy and putting numpy-1.2.1 into a directory named
> numpy-1.2.1 in python2.5/Lib/site-packages/ and running python
> setup.py install from the numpy-1.2.1 directory, you get a numpy
> directory in site-packages.

Wait, never put numpy-1.2.1 inside site-packes, build it somewhere else.

  Later, the install instructions refer to
> the numpy directory generically.  Which numpy directory are you
> talking about?  Should the numpy-1.2.1 directory not be in
> site-packages in the first place?  Ditto for scipy.  E.g. are you
> referring to the site.cfg in the distribution directory (numpy-1.2.1)
> or the installed directory (numpy without version notation).

Just get inside numpy-1.2.1, type python setup.py install and you
never have to use this folder. The only relevant folder is the numpy
one inside site-packages.

 Maybe
> you should give names to these directories (e.g. distribution and
> install) and always refer to them with leading adjectives.

Perhaps.

> It should be possible to create a script that keeps track of all of
> these extra lib configuration steps, so installs won't be so involved
> and error prone.

I just use python setup.py install, nothing else, and it works with
the default Linux mathematic libraries.

> I built ATLAS (they need better documentation of processor types and
> how to use what CPU-Z tells you) and I have MKL installed.  A quarter
> of my MKL evaluation days have already ticked away, and I've come to
> the disappointing realization that 30 days is probably not going to
> be enough to get the scipy/MKL install right.

I don't know if many people are using Numpy with the MKL on Windows.

> What's compatible with what?  There is mention of MKL, ATLAS, LAPACK
> and CLAPACK (I also downloaded CLAPACK 3.1.1.1).  It seems like
> CLAPACK would be naturally compatible because python uses C-style
> matrix addressing, but does Python (or numpy) flip indexes around if
> you have LAPACK instead of CLAPACK, so it works anyway, if slower?

CLAPACK is not a standard interface, so it is not usable with MKL or ACML.

> There is mention of ".numpy-site.cfg" in the user's home directory
> (which I created), but it didn't seem to have any effect on installing.

Only site.cfg is relevant.

> I created the following site.cfg in the numpy (install) directory:
>
> [mkl]
> include_dirs = D:\Programs\Intel\MKL\10.1.0.018\include
> library_dirs = D:\Programs\Intel\MKL\10.1.0.018\ia32\lib
> mkl_libs = mkl_ia32, mkl_c_dll, libguide40
> lapack_libs = mkl_lapack



> Do numpy AND scipy each need a site.cfg in their respective install
> directories?  If so, does one take precedence over the other?

Yes and I don't know ;)

> When I run 'python setup.py install' from the numpy install directory, I get:
>
> Warning: No configuration returned, assuming unavailable.
> blas_opt_info:
> blas_mkl_info:
>   libraries mkl, vml, guide not found in d:\Programs\Python25\lib
>   libraries mkl, vml, guide not found in C:\
>   libraries mkl, vml, guide not found in d:\Programs\Python25\libs
>   NOT AVAILABLE
>
> atlas_blas_threads_info:
> Setting PTATLAS=ATLAS
>   libraries mkl, vml, guide not found in d:\Programs\Python25\lib
>   libraries mkl, vml, guide not found in C:\
>   libraries mkl, vml, guide not found in d:\Programs\Python25\libs
>   NOT AVAILABLE
>
> atlas_blas_info:
>   libraries mkl, vml, guide not found in d:\Programs\Python25\lib
>   libraries mkl, vml, guide not found in C:\
>   libraries mkl, vml, guide not found in d:\Programs\Python25\libs
>   NOT AVAILABLE
>
> D:\Programs\Python25\lib\site-packages\numpy\disutils\system_info.py:1340:
> UserWarning:
>     Atlas (http://math-atlas.sourceforgr.net/) libraries not found
>     Directories to search for the libraries can be specified in the
> numpy/disutils/site.cfg file (section [atlas]) or by setting the
> ATLAS environment variable.
>   warnings.warn(AtlasNotFoundError.__doc__)
> blas_info:
>   libraries blas not found in d:\Programs\Python25\lib
> -----------------------------------------------------------------
> Where is it looking for blas_opt_info, blas_mkl_info,
> atlas_blas_threads_info, and atlas_blas_info?  Is it actually looking
> on sourceforge for Atlas?

it looks in site.cfg for those informations.

  FYI, when I try using make in
> ...MKL/10.1.0.018/examples/cblas, I get a "missing separator" error
> on the "!INCLUDE cblas.lst" line (first significant line in the
> file).  There are no spaces on this line.  Could cygwin make be
> complaining about something inside the cblas.lst file, or is
> complaining about the line not being terminated the way it expects it
> to be (I see carriage return, line feed pairs in the file).

Did you try mingw or Visual studio 2003?

Matthieu
-- 
Information System Engineer, Ph.D.
Website: http://matthieu-brucher.developpez.com/
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn: http://www.linkedin.com/in/matthieubrucher



More information about the NumPy-Discussion mailing list