Commit ceb28f55 authored by Miguel Avillez's avatar Miguel Avillez
Browse files

Update gadget/4.0/README.md

parent d0dffee7
......@@ -12,11 +12,14 @@ GADGET simulation code, which is a parallel cosmological N-body and SPH code mea
GADGET-4 supports collisionless simulations and smoothed particle hydrodynamics on massively parallel computers. All communication between concurrent execution processes is done either explicitly by means of the message passing interface (MPI), or implicitly through shared-memory accesses on processes on multi-core nodes. The code is mostly written in ISO C++ (assuming the C++11 standard), and should run on all parallel platforms that support at least MPI-3. So far, the compatibility of the code with current Linux/UNIX-based platforms has been confirmed on a large number of systems.
## 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.
Building the GADGET code requires a compiler with full C++11 support, MPI (e.g., MPICH, OpenMPI, IntelMPI), FFTW3, GSL, and HDF5. Hence, the corresponding environment modules must be loaded, 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
```
### Download the source code
......@@ -30,36 +33,64 @@ git clone http://gitlab.mpcdf.mpg.de/vrs/gadget4
Source code used in the benchmarks (version of June 21, 2021) [./gadget/4.0/gadget4.tar.gz](./gadget/4.0/gadget4.tar.gz)
### Build the Executable
Environment software need in the system: MPI (e.g., MPICH, OpenMPI, IntelMPI), FFTW3, GSL, HDF5
##### General building of the executable
1. Load the environment modules necessary to compile and run the code, e.g,
There are two files to obtain from the repository: gadget4.tar.gz and example_ics.tar.gz
gadget4.tar.gz includes the source code, examples, buildsystem, and documentation folders. It also includes Makefile and Makefile.systype (or a template of it)
example_ics.tar.gz includes initial conditions that are needed for each of the examples. When untarred you generate a folder named ExampleICs. You may download the examples initial conditions from (./gadget/4.0/example_ics.tar.gz)
1. After decompressing gadget4.tar.gz go to the master folder named gadget4 and adapt the Makefile.systype file to your needs. That is, select one of the system types by uncommenting the corresponding line or add, 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
#SYSTYPE="xxx-gompi"
```
where xxx = system name
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)
2. In the 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
3. The folder examples has several subfolders of test cases. From one of these subfolders, e.g., CollidingGalaxiesSFR, copy Config.sh to the master folder.
4. In the master folder compile the code
```
make CONFIG=Config_CollGal.sh EXEC=gadget4-collgal
make CONFIG=Config.sh EXEC=gadget4-exe
```
where EXEC is the name of the executable.
5. You need extra files to run the code, e.g., param.txt for all the runs, and TREECOOL for the Galaxies Collision test. These files are in the folder gadget4/examples/PROBLEM with PROBLEM being CollidingGalaxiesSFR, DM-L50-N128, and G2-gassphere
5. Create a folder named Test-Case-A. Copy gadget4-exe to Test-Case-A. From the examples subfolder CollidingGalaxiesSFR copy the files param.txt and TREECOOL to Test-Case-A.
6. In the folder Test-Case-A modify the first line of param.txt in order to reproduce the path of the initial conditions file ics_collision_g4.dat located in the folder ExampleICs.
7. Run the code using mpirun or submit a SLURM script file
#### Building of the test cases executable.
1. Download and untar a test case tarball, e.g., gadget4-caseA.tar.gz (see below) and the gadget code used in the benchmarks. The folder gadget4-caseA has the files Config.sh, ics_collision_g4.dat, param.txt, and TREECOOL.
2. Change to the folder named gadget4 and adapt the file Makefile.systype to your needs. Do not forget to adapt also the Makefile, by adding the following lines in 'define available Systems'
```
ifeq ($(SYSTYPE),"oblivion-impi")
include buildsystem/Makefile.comp.XXX-BBB
include buildsystem/Makefile.path.XXX-BBB
endif
```
where XXX = cluster name and BBB= whatever you may want to include here, e.g., impi, openmpi, etc.
3. Compile the code using the Config.sh file in gadget4-caseA
```
make CONFIG=../gadget4-caseA/Config.sh EXEC=../gadget4-caseA/gadget4-exe
```
You may download the examples initial conditions from (./gadget/4.0/example_ics.tar.gz)
4. Change to folder gadget4-caseA and make sure that the memory size per core is adequate to the system type.
6. Make sure that in param.txt you set the path to the initial conditions file.
5. run the code directly with mpirun or submit a script to, e.g., SLURM
7. 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:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment