Running amuse on the Huygens super computer

This super computer consists of SUSE Linux Enterprise Server, powerpc 6 nodes with xlc and mpfort compilers.

At the time of writing this description not all codes could be build with xlx, most codes need different flags and some other settings to get it to work.

Preparation

Make a directory for all work files etc.

mkdir amuse

cd amuse

Get the latest amuse release

wget http://www.amusecode.org/releases/amuse-5.0.tar.gz

To get an svn version of AMUSE (if you have an svn account):

module load subversion

svn co http://www.amusecode.org/svn/trunk amuse-svn

For a release download, unzip and untar the release

gzip -d amuse-5.0.tar.gz

tar -xvf amuse-5.0.tar

Create a file called 'setdev' and put this text in it:

#!/bin/sh

module load hdf5 
module load fftw3 
moudle load gsl

export AMUSEROOT=/home/<username>/<directory>

export PYTHONPATH=${PYTHONPATH}:${AMUSEROOT}/amuse-5.0/src
export PYTHONPATH=${AMUSEROOT}/prerequisites/lib/python2.6/site-packages/:${PYTHONPATH}

export PREFIX=${AMUSEROOT}/prerequisites/
export PATH=${PREFIX}/bin:${PATH}
export LD_LIBRARY_PATH=${PREFIX}/lib:${LD_LIBRARY_PATH}
export LIBRARY_PATH=${PREFIX}/lib:${LIBRARY_PATH}

export FC=gfortran
export F77=gfortran
export FORTRAN=gfortran
export CC=gcc
export CXX=g++

export MPIFC='mpfort -compiler gfortran'
export MPICC='mpcc -compiler gcc'
export MPICXX='mpCC -compiler g++ -cpp'

Take care to replace <username> with your name and <directory> with the directory containing the workfiles ('amuse' if you follow all steps to the letter). Also take car to replace amuse-5.0 with amuse-svn if you ran the svn checkout line.

Before installing any packages or building amuse do:

source setdev

mkdir $PREFIX

Nosetests and docutils

Nose and docutils are straightforward python install packages. Download and untar the packages ( Nose,  docutils ) and type

python setup.py build
python setup.py install --prefix=$PREFIX

from their respective directories.

building mpi4py

First download and untar the mpi4py package ( http://mpi4py.googlecode.com/files/mpi4py-1.3.tar.gz).

Next open the mpi.cfg file and add the following lines to the [mpi] section:

mpicc  = mpcc -compiler gcc
mpicxx = mpCC -compiler gcc

Then, you can build and install mpi4py with:

python setup.py build
python setup.py install --prefix=$PREFIX

To check if it worked do (in any directory except the mpi4py package dir):

hostname > hostfile
hostname >> hostfile

cat > getvendor.py <<EOF
from mpi4py import MPI
print MPI.get_vendor()
print MPI.COMM_WORLD.rank
print MPI.COMM_WORLD.size
EOF

MP_HOSTFILE=${PWD}/hostfile MP_PROCS=2 python getvendor.py

building hdf5

source setdev

cd $PREFIX

mkdir build

wget http://h5py.googlecode.com/files/h5py-2.0.1.tar.gz

gzip -d h5py-2.0.1.tar

tar -xvf h5py-2.0.1.tar

cd h5py-2.0.1

CC=gcc python setup.py build
CC=gcc python setup.py install --prefix=$PREFIX

fftw, cmake

cd doc/install

python install.py --prefix=${PREFIX} install fftw3 cmake

compile

./configure

make clean

make

Run

hostname > hostfile
hostname >> hostfile
hostname >> hostfile
hostname >> hostfile
hostname >> hostfile
hostname >> hostfile

MP_HOSTFILE=${PWD}/hostfile MP_PROCS=5 MP_WORLD_SIZES=1  nosetests -sv test/codes_tests/test_bhtree.py

XLC

You can build some code in amuse with xlc/xlfotran but not all, for now we recommend using gcc/gfortran.