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

Update gadget/4.0/README.md

Deleted gadget/4.0/gadget4_20210622.tar.gz, gadget/4.0/gadget4-case-A.tar.gz files
parent 6f4ddcdb
......@@ -31,7 +31,7 @@ or get a cloned repository of the code by using
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)
Source code used in the benchmarks (version of June 22, 2021) [./gadget/4.0/gadget4.tar.gz](./gadget/4.0/gadget4.tar.gz)
### Build the Executable
......@@ -45,9 +45,9 @@ example_ics.tar.gz includes initial conditions that are needed for each of the e
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.,
```
#SYSTYPE="xxx-gompi"
#SYSTYPE="XXX-impi"
```
where xxx = system name
where XXX = system 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.
......@@ -63,13 +63,14 @@ where EXEC is the name of the executable.
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 param.txt to include the adequate path to the initial confidions file ics_collision_g4.dat located in the folder ExampleICs and modify the memory per core to that of the system you are using.
6. In the folder Test-Case-A modify param.txt to include the adequate path to the initial conditions file ics_collision_g4.dat located in the folder ExampleICs and modify the memory per core to that of the system you are using.
7. Run the code using mpirun or submit a SLURM script.
##### Building the test cases executable
##### Building a test case executable | Case A
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. The param.txt file has the path for the initial conditions.
1. Download and untar a test case tarball, e.g., gadget4-case-A.tar.gz (see below) and the gadget4.tar.gz used in the benchmarks. The folder gadget4-case-A has the files Config.sh, ics_collision_g4.dat, param.txt, and TREECOOL. The param.txt file has the path for the initial conditions and was adapted for a system with 2.0 GB RAM per core, in effect 1.8 GB.
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'
......@@ -79,15 +80,15 @@ 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.
where XXX = system 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
3. Compile the code using the Config.sh file in gadget4-case-A
```
make CONFIG=../gadget4-caseA/Config.sh EXEC=../gadget4-caseA/gadget4-exe
make CONFIG=../gadget4-case-A/Config.sh EXEC=../gadget4-case-A/gadget4-exe
```
4. Change to folder gadget4-caseA and make sure that in the file param.txt the memory size per core is the correct one for the system you are using.
4. Change to folder gadget4-case-A and make sure that the file param.txt has the correct memory size per core for the system you are using.
5. Run the code directly with mpirun or submit a SLURM script.
......@@ -97,26 +98,26 @@ The general way to run the benchmarks, assuming SLURM Resource/Batch Manager is:
1. Set the environment modules (see Build the Executable section)
2. In the folder of the test cases, e.g., gadget4-caseA, adapt the SLURM script and submit it
2. In the folder of the test cases, e.g., gadget4-case-A, adapt the SLURM script and submit it
```
sbatch gadget_script.sh
sbatch slurm_script.sh
```
where the gadget_script.sh has the form:
where the gadget_script.sh has the form (for a run with 1024 cores):
```
#!/bin/bash -l
#SBATCH --time=04:00:00
#SBATCH --account=astro_00
#SBATCH --job-name=collgal-tMax=1.0-0512
#SBATCH --time=01:00:00
#SBATCH --account=ACCOUNT
#SBATCH --job-name=collgal-01024
#SBATCH --output=g_collgal_%j.out
#SBATCH --error=g_collgal_%j.error
#SBATCH --nodes=16
#SBATCH --ntasks=512
#SBATCH --nodes=32
#SBATCH --cpus-per-task=1
#SBATCH --ntasks-per-socket=16
#SBATCH --ntasks-per-socket=17
#SBATCH --ntasks-per-node=33
#SBATCH --exclusive
#SBATCH --partition=debug
#SBATCH --partition=batch
echo
echo "Running on hosts: $SLURM_NODELIST"
......@@ -125,12 +126,18 @@ echo "Running on $SLURM_NPROCS processors."
echo "Current working directory is `pwd`"
echo
srun ./gadget4_collgal param.txt
srun ./gadget4-exe param.txt
```
Where:
* gadget4_collgal is the executable.
* gadget4-exe is the executable.
* param.txt is the input parameter file.
##### NOTE
Gadget-4 uses one core per compute node to handle communications. Hence, when allocating compute
nodes we must take into account an extra core. So, if we want to run the code with 16 mpi tasks/socket we
must allocate 33 cores per compute node. For a run with 1024 cores in 32 nodes we allocate 1056 cores.
### UEABS Benchmarks
......
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