[Numpy-discussion] numpy.scons: 2nd alpha

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Nov 7 07:45:37 CST 2007


Hi,

    I have just finished to implement everything I wanted to do for a 
2nd alpha for numpy.scons. Most of the work since 1st alpha was 
infrastructure polishing (performance library, fortran): now, most 
common performance libraries are fully supported (MKL and ATLAS on 
linux, sunperf on solaris, vecLib/Accelerate on Mac OS X). I would 
appreciate people testing the branch

http://projects.scipy.org/scipy/numpy/wiki/NumpyScons#Gettingthecode

There are minor problem preventing the thing to build on windows for 
some reasons, but this will be fixed soon. Basically, the whole design 
is now done, and it should be able to support all the platforms (and 
more) currently supported by numpy.distutils. I would really like to 
hear about people intimated with numpy.distutils, and package developers 
for some things I may have missed. I think numpy.scons is now much 
better and easier as a build system, but I am obviously biased.

Most significant changes since 1st alpha:

Documentation
=============

I started to put more documentation on the numpy wiki:

http://projects.scipy.org/scipy/numpy/wiki/NumpyScons

There is also some basic description on the design:

http://projects.scipy.org/scipy/numpy/browser/branches/numpy.scons/numpy/distutils/scons/doc/DESIGN

Configuration check
===================

    - performance libraries are globally supported (default and site.cfg 
configuration): MKL, ATLAS, Accelerate/vecLib and Sunperf are 
implemented. Adding a new performance library can be as easy as a 5 
lines code.
    - 'meta' checkers are now reusing code from performance libraries: 
Both CBLAS and LAPACK are implemented.

This means that numpy can now be entirely built with scons, using 
optimized libraries on the following platforms:
    - solaris with sunperf and sunstudio (this one has not been 
extensively tested: it looks like every solaris machine I have access to 
behaves really differently).
    - mac os X and Gnu toolchain
    - linux + ATLAS/MKL + gnu toolchain

I am now relatively happy with the code for BLAS/LAPACK and performance 
libraries implementation. It is easily extensible and quite flexible.

Generci library check
=====================

I have updated and improved the basic checker, NumpyCheckLibAndHeader. 
This should cover most basic needs (check for a library with some 
functions and some headers), and should be able to replace system_info 
for many cases. For example, the following will check for the function 
sf_open in the library sndfile, with header sndfile.h:

config.NumpyCheckLibAndHeader(*'sndfile'*, *'sf_open'*, *'sndfile.h'*, section = *'sndfile'*)

section is optional, and tells the checker to use sndfile section in 
site.cfg if found.

Fortran support
===============

I have polished fortran support: in perticular, name mangling for F77 
and F90 is implemented and has been tested with 
g77/gfortran/ifort/sunfort on various platforms. It also defines 
variables usable by f2py 
(http://projects.scipy.org/scipy/numpy/wiki/NumpySconsExtExamples#UsingFortran).

cheers,

David



More information about the Numpy-discussion mailing list