i like this post (click again to cancel)
1
i dont like this post (click again to cancel) remove favorite mark from this question (click again to restore mark)

I'd like to use the multithreaded ATLAS library with numpy/scipy but I don't have root privileges. What can I do ?

flag offensive community wiki
add comment
4 Answers:
i like this answer (click again to cancel)
2
i dont like this answer (click again to cancel)

Try the following:

(I will assume that you have the necessary compiler and that you are using python2.5, adapt accordingly)

prepare ~/usr

mkdir -p ~/usr/lib
ln -sf  lib ~/usr/lib64

get lapack

mkdir -p ~/src && cd ~/src
wget http://www.netlib.org/lapack/lapack.tgz
tar xzvf lapack.tgz

build lapack

cd ~/src/lapack-3.2.1
cp -vf make.inc.example make.inc
vi make.inc
# OPTS = -O2 -fPIC -m64
# NOOPT = -O0 -fPIC -m64
#the -m64 flags build 64-bit code (nothing for 32bit)
cd ~/src/lapack-3.2.1/SRC
make -j 4

get atlas (3.8.3)

mkdir -p ~/src && cd ~/src
wget "http://sourceforge.net/project/downloading.php?group_id=23725&filename=atlas3.8.3.tar.bz2&a=65663372"
tar xjvf atlas3.8.3.tar.bz2

build atlas

cd ~/src/ATLAS/
mkdir -p Linux_X64SSE2 && cd Linux_X64SSE2
../configure -b 64 -D c -DPentiumCPS=2216 -Fa alg -fPIC --with-netlib-lapack=$HOME/src/lapack-3.2.1/lapack_LINUX.a -Si cputhrchk 0

make build
make check
make ptcheck
make time
cd lib
make shared
make ptshared
mkdir -p $HOME/usr/lib/ && cp -vf *.so  *.a $HOME/usr/lib/
export LD_LIBRARY_PATH=$HOME/usr/lib:$LD_LIBRARY_PATH

setup python path

mkdir -p $HOME/usr/lib/python2.5/site-packages
vi ~/.bashrc
export PYTHONPATH=$HOME/usr/lib/python2.5/site-packages:$PYTHONPATH
source ~/.bashrc

numpy

mkdir -p ~/src && cd ~/src
wget http://voxel.dl.sourceforge.net/sourceforge/numpy/numpy-1.3.0.tar.gz
tar xzvf numpy-1.3.0.tar.gz
cd ~/src/numpy-1.3.0
rm -rvf build
cp -vf site.cfg.example site.cfg
vi site.cfg
[DEFAULT]
library_dirs = /home/ac/npinto/usr/lib
include_dirs = /home/ac/npinto/usr/include
[blas_opt]
libraries = ptf77blas, ptcblas, atlas

[lapack_opt]
libraries = lapack, ptf77blas, ptcblas, atlas

python setup.py build --fcompiler=gnu95
python setup.py install --prefix=$HOME/usr
export PYTHONPATH=$HOME/usr/lib/python2.5/site-packages:$PYTHONPATH
# verify install
(cd ~/ && python -c "import numpy; assert numpy.dot.__module__ == 'numpy.core._dotblas'; from numpy.linalg import lapack_lite")

scipy

mkdir -p ~/src; cd ~/src
wget http://voxel.dl.sourceforge.net/sourceforge/scipy/scipy-0.7.0.tar.gz
tar xzvf scipy-0.7.0.tar.gz
cd ~/src/scipy-0.7.0
rm -rvf build
python setup.py build
python setup.py install --prefix=$HOME/usr
export PYTHONPATH=$HOME/usr/lib/python2.5/site-packages:$PYTHONPATH
# verify install
(cd ~/ && python -c "from scipy import linalg"
permanent link | flag offensive
asked 2009-08-25 19:18:50
npinto's gravatar image
71
comments (1)
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

You can also install Sage.

It includes all these and much more.

permanent link | flag offensive
asked 2010-02-25 03:40:33
sigurdmeldgaard's gravatar image
1
add comment
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

Or FEMhub (http://femhub.org).

permanent link | flag offensive
asked 2010-02-25 14:44:59
Ondrej%20Certik's gravatar image
1
add comment
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

when I type this line: "../configure -b 64 -D c -DPentiumCPS=2216 -Fa alg -fPIC --with-netlib-lapack=$HOME/src/lapack-3.2.1/lapack_LINUX.a -Si cputhrchk 0" ("build atlas" section) i get this error:

/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or directory make[2]: * [IRunCComp] Error 1 Unable to find usable compiler for ICC; abortingMake sure compilers are in your path, and specify good compilers to configure (see INSTALL.txt or 'configure --help' for details)make[1]: * [atlas_run] Error 1

Anyone can help me?

add comment
Your answer:
You are now not logged in but you can answer first and then login
toggle preview

Made with Django.