User Tools

Site Tools




source .bashrc

.bashrc :

export PATH=$HOME/bin:$PATH

#gcc 4.7.2
module add gcc/4.7.2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

# Python 2.6.5 on /opt/gridware
export PATH=/opt/gridware/python2.6.5/bin:$PATH
export LD_LIBRARY_PATH=/opt/gridware/python2.6.5/lib/:$LD_LIBRARY_PATH

Thats it. The /opt/gridware python comes with nose, ipython, and numpy. However numpy is a little broken :

$ ipython
$ import numpy
$ numpy.test()

Installing packages

Assuming your codes are to be run on the dell cluster, add the following lines to your .bashrc file

#if feature=dell check still needs to be added
export PYTHONPATH=~/local_dell/lib/python:~/local_dell/lib/python2.6/site-packages/
export PATH=$HOME/local_dell/bin:$PATH

create the required directories

$ mkdir -p $HOME/local_dell/lib/python2.6/site-packages/
$ mkdir -p $HOME/local_dell/bin


Use for tool for managing and install Python packages. Setuptool provides the easy_install command

$ cd tmp
$ wget
$ tar -xf setuptools-0.6c11.tar.gz
$ cd setuptools-0.6c11
$ python install --prefix=$HOME/local_dell


From the login node (which has http access) simply

$ easy_install --prefix=$HOME/local_dell argparse

numpy (minimal)

$ msub -I -l feature=dell
$ cd ~/tmp
$ ssh login01 wget
$ mv ../numpy-1.6.2.tar.gz ./
$ tar -xf numpy-1.6.2.tar.gz
$ cd numpy-1.6.2
$ export ATLAS=None
$ export BLAS=None
$ export LAPACK=None
$ python build --fcompiler=gnu95
$ python install --prefix=$HOME/local_dell

when testing you should get

$ ipython
  import numpy
Ran 3568 tests in 11.266s

Out[3]: <nose.result.TextTestResult run=3568 errors=0 failures=0>

scipy (minimal)

$ msub -I -l feature=dell
$ cd ~/tmp
$ ssh login01 wget
$ mv ../scipy-0.10.1.tar.gz ./
$ tar -xf scipy-0.10.1.tar.gz
$ cd scipy-0.10.1/
$ python build --fcompiler=gnu95 #takes about 10 minutes to build
$ python install --prefix=$HOME/local_dell


$ cd ~/
$ ipython
  import scipy

which did not work 100 % :(

FAILED (KNOWNFAIL=13, SKIP=41, failures=2) Out[2]: <nose.result.TextTestResult run=5101 errors=0 failures=1>

matplotlib / pylab

$ msub -I -l feature=dell
$ cd ~/tmp
$ ssh login01 wget
$ mv ../matplotlib-1.2.0.tar.gz ./
$ tar -xf matplotlib-1.2.0.tar.gz
$ cd matplotlib-1.2.0
$ python install --prefix=$HOME/local_dell


Is already installed, all that is needed is to load the openmpi module; add the following line to .bashrc

module add openmpi-1.6.1-intel
/var/www/wiki/data/pages/howto/python/start.txt · Last modified: 2013/01/17 15:26 by adymond