University of Dundee MHD Group |
Postdoctoral Fellow Simon Candelaresi |
|
Installation of the Pencil Code on norlx55 and norlx56
To login to the machine norlx55 and norlx56 you will first need a user account. For that you should contact Iouri (yb /+/ nordita.org). To login via ssh with X-forwarding you just typessh -X USERNAME@norlx55.albanova.se
USERNAME
is your Nordita user name.
Now add the CVS and SVN directories and some paths to you
.bashrc.
, by adding these lines:
export CVSROOT=:pserver:$USER@svn.nordita.org:/var/cvs/brandenb
export PENCIL_HOME=$HOME/pencil-code
_sourceme_quiet=1; . $PENCIL_HOME/sourceme.sh; unset _sourceme_quiet
export PYTHONPATH=$PENCIL_HOME/python
alias pc='cd $PENCIL_HOME'
export PATH=$PATH:$PENCIL_HOME/remesh/bin
# python stuff
export PYTHONSTARTUP=~/.pythonrc
export PYTHONPATH=$PENCIL_HOME/python
export PYTHONPATH=$PYTHONPATH:$PENCIL_HOME/python/pencil/files/
source ~/.bashrc
mkdir ~/local
numpy
wget http://sourceforge.net/projects/numpy/files/NumPy/1.4.1/numpy-1.4.1.tar.gz/download
tar -xvzf numpy-1.4.1.tar.gz
cd numpy-1.4.1
python setup.py build --fcompiler=gnu95
python setup.py install --prefix=$HOME/local/
export PYTHONPATH=$PYTHONPATH:/home/x_simca/local/lib64/python2.4/site-packages
BLAS
wget http://www.netlib.org/blas/blas.tgz
tar -xvf blas.tgz
cd BLAS
gfortran -O3 -m64 -fno-second-underscore -fPIC -c *.f
ar rv libblas.a *.o
cp libblas.a ~/local/lib64/
ln -s ~/local/lib64/libblas.a ~/local/lib64/libfblas.a
export BLAS=$HOME/local/lib64/libblas.a
LAPACK
wget http://www.netlib.org/lapack/lapack.tgz
tar -xvf lapack.tgz
cd lapack-3.2.1
cp make.inc.example make.inc
# edit make.inc:
OPTS = -O2 -m64 -fPIC
NOOPT = -m64 -fPIC
# in the console:
make lapacklib
cp lapack_LINUX.a $HOME/local/lib64/liblapack.a
ln -s $HOME/local/lib64/liblapack.a $HOME/local/lib64/libflapack.a
export LAPACK=$HOME/local/lib64/liblapack.a
scipy
wget http://sourceforge.net/projects/scipy/files/scipy/0.8.0b1/scipy-0.8.0b1.tar.gz/download
tar -xvzf scipy-0.8.0b1.tar.gz
cd scipy-0.8.0b1
python setup.py build --fcompiler=gnu95
python setup.py install --prefix=$HOME/local/
export PYTHONPATH=$PYTHONPATH:$HOME/local/lib64/python2.4/site-packages
matplotlib
wget http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/matplotlib-0.99.3.tar.gz
tar -xvzf matplotlib-0.99.3.tar.gz
cd matplotlib-0.99.3
python setup.py build
python setup.py install --prefix=$HOME/local/
.bashrc
If you use bash edit your~/.bashrc
:
export PYTHONPATH=$PYTHONPATH:$HOME/local/lib64/python2.4/site-packages
export BLAS=$HOME/local/lib64/libblas.a
export LAPACK=$HOME/local/lib64/liblapack.a
export PATH=$PATH:$HOME/local/bin/
How to setup python with numpy and pylab on Ferlin
The configuring under Ferlin is much easier than on Neolith now, thanks to the guys at PDC. Simply edit your~/.bashrc
if you are using bash:
export PATH=/pdc/vol/python/2.6.5/bin:$PATH
export PYTHONPATH=/pdc/vol/python/2.6.5/lib:/pdc/vol/python/packages/site-python-2.6/lib/python:$PYTHONPATH
References
http://matplotlib.sourceforge.net/users/installing.html
http://ab-initio.mit.edu/wiki/index.php/Template:Installing_BLAS_and_LAPACK
http://www.scipy.org/Installing_SciPy/BuildingGeneral#head-a99e89881841cba43f7091c443a0ccfc9f19f394
http://www.netlib.org/blas/
http://www.mtheory.co.uk/support/index.php?title=Installing_Python_-_iPython%2C_Numpy%2C_Scipy_and_Matplotlib_on_OS_X