Skip to content
README.md 4.73 KiB
Newer Older
# GADGET


## Summary Version
4.0

## Purpose of Benchmark
GADGET simulation code, which is a parallel cosmological N-body and SPH code meant for simulations of cosmic structure formation and calculations relevant for galaxy evolution and galactic dynamics.


## Characteristics of Benchmark


## Mechanics of Building Benchmark
Complete Build instructions can be found at 

It requires a compiler with full C++11 support, MPI (e.g., MPICH, OpenMPI, IntelMPI), FFTW3, GSL, and HDF5.

### Download the source code
Latest Release can be downloaded from
[https://gitlab.mpcdf.mpg.de/vrs/gadget4](https://gitlab.mpcdf.mpg.de/vrs/gadget4)

or get a cloned repository of the code by using 

git clone http://gitlab.mpcdf.mpg.de/vrs/gadget4

[https://manual.gromacs.org/documentation/#latest-releases](https://manual.gromacs.org/documentation/#latest-releases)
```
wget https://ftp.gromacs.org/gromacs/gromacs-VERSION.tar.gz
tar -zxf gromacs-VERSION.tar.gz
cd gromacs-VERSION
mkdir build
cd build
```

### Build the Executable

Environment software need in the system: MPI (e.g., MPICH, OpenMPI, IntelMPI), FFTW3, GSL, HDF5

1. Load the environment modules necessary to compile and run the code, e.g,

```
module load \
mpi/OpenMPI/4.0.3-GCC-9.3.0\
data/HDF5/1.10.6-gompi-2020a \
numlib/FFTW/3.3.8-gompi-2020a \
numlib/GSL/2.6-GCC-9.3.0 
```

2. In Makefile.systype select the machine you are using

3. In folder buildsystem make sure you have the Makefile.comp.xxx and Makefile.path.xxx (xxx = cluster name)
set with the proper paths and compilation options, respectively.

4. Compile the code

make CONFIG=Config_CollGal.sh EXEC=gadget4-collgal

5. mkdir gallcol_run

6. cp gadget4-collgal gallcol_run

7. You need the extra files to run the code: param.txt and TREECOOL (they are in the folder gadget4/examples/CollidingGalaxiesSFR)

Make sure that in param.txt you set the path to the initial conditions file.

8. set your SLURM configuration file to your needs and launch the run.
        
### Mechanics of Running Benchmark
The general way to run the benchmarks, assuming SLURM Resource/Batch Manager is:

```
#!/bin/bash -l 
#SBATCH --time=04:00:00
#SBATCH --account=astro_00
#SBATCH --job-name=collgal-tMax=1.0-0512
#SBATCH --output=g_collgal_%j.out
#SBATCH --error=g_collgal_%j.error
#SBATCH --nodes=16
#SBATCH --ntasks=512
#SBATCH --cpus-per-task=1
#SBATCH --ntasks-per-socket=16
#SBATCH --exclusive
#SBATCH --partition=debug

echo
echo "Running on hosts: $SLURM_NODELIST"
echo "Running on $SLURM_NNODES nodes."
echo "Running on $SLURM_NPROCS processors."
echo "Current working directory is `pwd`"
echo

srun ./gadget4_collgal param.txt
```
Where:

* gadget4_collgal is the executable.
* param.txt is the input parameter file. 

### UEABS Benchmarks

**A) `Colliding galaxies with star formation`**

This simulation with setup in the folder CollidingGalaxiesSFR considers the collision of two compound galaxies made up of a dark matter halo, a stellar disk and bulge, and cold gas in the disk that undergoes star formation. Radiative cooling due to helium and hydrogen is included. Star formation and feedback is modelled with a simple subgrid treatment. 

Download test Case A
[(./gadget/4.0/gadget4-caseA.tar.gz)](./gadget/4.0/gadget4-caseA.tar.gz)

**B) `Cosmological DM-only simulation with IC creation`**

The setup in DM-L50-N128 simulates a small box of comoving side-length 50 Mpc/h using 128^3 dark matter particles. The initial conditions are created on the fly upon start-up of the code, using second order Lagrangian perturbation theory with a starting redshift of z=63. The LEAN option and 32-bit arithmetic are enabled to minimize memory consumption of the code.

Gravity is computed with the TreePM algorithm at expansion order p=3. Three output times are defined, for which FOF group finding is enabled, and power spectra are computed as well for the snapshots that are produced. Also, the code is asked to compute a power spectrum for each output.

Download test Case B 
[(./gadget/4.0/gadget4-caseB.tar.gz)](./gadget/4.0/gadget4-caseB.tar.gz)


**C) `Adiabatic collapse of a gas sphere` **

This simulation in G2-gassphere considers the gravitational collapse of a self-gravitating sphere of gas which initially has a 1/r density profile and a very low temperature. The gas falls under its own weight to the centre, where it bounces back and a strong shock wave that moves outwards develops. The simulation uses Newtonian physics in a natural system of units (G=1).

Download test Case C 
[(./gadget/4.0/gadget4-caseC.tar.gz)](./gadget/4.0/gadget4-caseC.tar.gz)
   
## Performance 
GADGET reports in log file both time and performance. 

** `Performance` in `ns/day` units : `grep Performance logfile | awk -F ' ' '{print $2}'`.  **

** `Execution Time` in `seconds` : `grep Time: logfile | awk -F ' ' '{print $3}'`**