[Numpy-discussion] Problems building NumPy with GotoBLAS
David
david at silveregg.co.jp
Tue Aug 17 21:00:40 EDT 2010
On 08/17/2010 08:43 PM, Eloi Gaudry wrote:
> Peter,
>
> please below a script that will build numpy using a relevant site.cfg for your configuration (you need to update GOTODIR and LAPACKDIR and PYTHONDIR):
>
> #!/bin/sh
>
> #BLAS/LAPACK configuration file
> echo "[blas]"> ./site.cfg
> echo "library_dirs = GOTODIR">> ./site.cfg
> echo "blas_libs = goto2_nehalemp-r1.13">> ./site.cfg
> echo "[lapack]">> ./site.cfg
> echo "library_dirs = LAPACKDIR">> ./site.cfg
> echo "lapack_libs = lapack">> ./site.cfg
>
> #compilation variables
> export CC=gcc
> export F77=gfortran
> export F90=gfortran
> export F95=gfortran
> export LDFLAGS="-shared -Wl,-rpath=\'\$ORIGIN/../../../..\'"
> export CFLAGS="-O1 -pthread"
> export FFLAGS="-O2"
>
> #build
> python setup.py config
> python setup.py build
> python setup.py install
>
> #copy site.cfg
> cp ./site.cfg PYTHONDIR/lib/python2.6/site-packages/numpy/distutils/.
This should be PYTHONPATH, not PYTHONDIR. Also, on 64 bits, you need
-fPIC in every *FLAGS variables.
cheers,
David
More information about the NumPy-Discussion
mailing list