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 14:57] sfebruary |
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# | ||
| - | - Running Gadget2 | + | - [[gadget-2# |
| + | - [[gadget-2# | ||
| ===== Compiling your own Gadget2 code ===== | ===== Compiling your own Gadget2 code ===== | ||
| + | === Step 1 === | ||
| + | |||
| + | Log in to the cluster, '' | ||
| + | <code bash> | ||
| + | localuser@mylaptop: | ||
| + | Last login: Fri Apr 01 15:00:00 2016 from 10.128.23.235 | ||
| + | [username@login1 ~]$ wget http:// | ||
| + | [username@login1 ~]$ tar zxvf gadget-2.0.7.tar.gz | ||
| + | </ | ||
| + | |||
| + | === Step 2 === | ||
| + | |||
| + | Navigate into the '' | ||
| + | <code bash> | ||
| + | module add gcc/5.1.0 chpc/ | ||
| + | UTILS_DIR=/ | ||
| + | GSL_INSTALL=gsl-1.16-build | ||
| + | FFTW_INSTALL=fftw-2.1.5-build | ||
| + | export PATH=$UTILS_DIR/ | ||
| + | export PATH=$UTILS_DIR/ | ||
| + | export PATH=$UTILS_DIR/ | ||
| + | export LD_LIBRARY_PATH=$UTILS_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: | ||
| + | <code bash> | ||
| + | [username@login1 Gadget-2.0.7/ | ||
| + | </ | ||
| + | |||
| + | ===== Running Gadget2 ===== | ||
| + | |||
| + | 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: | ||
| - | ===== Compiling your own Gadget2 code ===== | ||