User Tools

Site Tools


howto:gadget-2

This is an old revision of the document!


Gadget2 at CHPC

Compiling your own Gadget2 code

Step 1

Log in to the cluster, wget the source code and unpack, e.g.

localuser@my_linux:~ $ ssh username@lengau.chpc.ac.za
Last login: Fri Apr 01 15:00:00 2016 from 10.128.23.235
[username@login1 ~]$ wget http://wwwmpa.mpa-garching.mpg.de/gadget/gadget-2.0.7.tar.gz
[username@login1 ~]$ tar zxvf gadget-2.0.7.tar.gz

Step 2

Navigate into the Gadget-2.0.7/Gadget2/ directory - this is where the heart of the Gadget code sits. Edit the Makefile as required (note example Makefiles and parameter files located in Gadget-2.0.7/Gadget2/parameterfiles/). Before compiling, be sure to source the following modules and paths (HDF5 excluded here for now):

module add gcc/5.1.0 chpc/openmpi/1.8.8/gcc-5.1.0
DEPS_DIR=/apps/chpc/astro/utils/gcc/v510-openmpi188
GSL_INSTALL=gsl-1.16-build
FFTW_INSTALL=fftw-2.1.5-build
export PATH=$DEPS_DIR/$GSL_INSTALL/include:$PATH
export PATH=$DEPS_DIR/$GSL_INSTALL/bin:$PATH
export PATH=$DEPS_DIR/$FFTW_INSTALL/include:$PATH
export LD_LIBRARY_PATH=$DEPS_DIR/$GSL_INSTALL/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$DEPS_DIR/$FFTW_INSTALL/lib:$LD_LIBRARY_PATH

Finally, to compile:

[username@login1 Gadget-2.0.7/Gadget2]$ make

Running Gadget2

Coming soon..

/app/dokuwiki/data/attic/howto/gadget-2.1459522586.txt.gz · Last modified: 2021/12/09 16:42 (external edit)