This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:gadget-2 [2016/04/01 16:56] sfebruary [Running Gadget2] |
howto:gadget-2 [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Gadget2 at CHPC ====== | ====== Gadget2 at CHPC ====== | ||
| + | |||
| + | From its [[http:// | ||
| Contents: | Contents: | ||
| - [[gadget-2# | - [[gadget-2# | ||
| - [[gadget-2# | - [[gadget-2# | ||
| + | - [[gadget-2# | ||
| ===== Compiling your own Gadget2 code ===== | ===== Compiling your own Gadget2 code ===== | ||
| Line 11: | Line 13: | ||
| Log in to the cluster, '' | Log in to the cluster, '' | ||
| <code bash> | <code bash> | ||
| - | localuser@my_linux:~ $ ssh username@lengau.chpc.ac.za | + | localuser@mylaptop:~ $ ssh username@lengau.chpc.ac.za |
| Last login: Fri Apr 01 15:00:00 2016 from 10.128.23.235 | Last login: Fri Apr 01 15:00:00 2016 from 10.128.23.235 | ||
| [username@login1 ~]$ wget http:// | [username@login1 ~]$ wget http:// | ||
| Line 19: | Line 21: | ||
| === Step 2 === | === Step 2 === | ||
| - | Navigate into the '' | + | Navigate into the '' |
| <code bash> | <code bash> | ||
| module add gcc/5.1.0 chpc/ | module add gcc/5.1.0 chpc/ | ||
| - | DEPS_DIR=/ | + | UTILS_DIR=/ |
| GSL_INSTALL=gsl-1.16-build | GSL_INSTALL=gsl-1.16-build | ||
| FFTW_INSTALL=fftw-2.1.5-build | FFTW_INSTALL=fftw-2.1.5-build | ||
| - | export PATH=$DEPS_DIR/ | + | export PATH=$UTILS_DIR/ |
| - | export PATH=$DEPS_DIR/ | + | export PATH=$UTILS_DIR/ |
| - | export PATH=$DEPS_DIR/ | + | export PATH=$UTILS_DIR/ |
| - | export LD_LIBRARY_PATH=$DEPS_DIR/ | + | export LD_LIBRARY_PATH=$UTILS_DIR/ |
| - | export LD_LIBRARY_PATH=$DEPS_DIR/ | + | export LD_LIBRARY_PATH=$UTILS_DIR/ |
| </ | </ | ||
| + | as well as add the appropriate " | ||
| + | <code bash> | ||
| + | # | ||
| + | SYSTYPE=" | ||
| + | |||
| + | ifeq ($(SYSTYPE)," | ||
| + | CC | ||
| + | OPTIMIZE = -O3 -Wall | ||
| + | GSL_INCL = -I/ | ||
| + | GSL_LIBS = -L/ | ||
| + | FFTW_INCL= | ||
| + | FFTW_LIBS= | ||
| + | MPICHLIB = | ||
| + | HDF5INCL = | ||
| + | HDF5LIB | ||
| + | endif | ||
| + | </ | ||
| Finally, to compile: | Finally, to compile: | ||
| <code bash> | <code bash> | ||
| Line 39: | Line 58: | ||
| ===== Running Gadget2 ===== | ===== Running Gadget2 ===== | ||
| - | Coming soon.. | + | This assumes you have successfully compiled Gadget, have put together a parameter file for your particular simulation as well as generated the corresponding initial conditions. For now, let's consider one of the examples provided in '' |
| + | |||
| + | === Step 1 === | ||
| + | Make sure that you create the necessary paths (and directories) for the storing of your input data (e.g. initial conditions) as well as for the saving of Gadget2 snapshots (and other information) somewhere **on the Lustre (scratch) filesystem** i.e. ''/ | ||
| + | |||
| + | === Step 2 === | ||
| + | Create a PBS script for the job and then submit the job to the cluster queue (see [[quick: | ||
| + | <code bash> | ||
| + | [username@login1 ~]$ qsub mypbsjobscript.sh | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Generating Initial Conditions ===== | ||
| + | If you require any help with generating your own initial conditions, please contact [[mailto: | ||