Commit 652dd904 authored by Miguel Avillez's avatar Miguel Avillez
Browse files

Update gadget/4.0/README.md

parent c99cc0a5
......@@ -32,29 +32,29 @@ 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 22, 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-benchmarks.tar.gz](./gadget/4.0/gadget4-benchmarks.tar.gz)
### Build the Executable
##### General building of the executable
##### General Building of the Executable
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)
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``)
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](./gadget/4.0/example_ics.tar.gz)
1. After decompressing gadget4.tar.gz go to the master folder named gadget4. There are two files that need modification: Makefile.systype and Makefile.
- In the Makefile.systype select one of the system types by uncommenting the corresponding line or add a line with your system, e.g.,
a) In the Makefile.systype select one of the system types by uncommenting the corresponding line or add a line with your system, e.g.,
```
#SYSTYPE="XXX-BBB"
```
where XXX = system name and BBB = whatever you may want to include here, e.g., impi, openmpi, etc.
- In case you uncommented a line corresponding to your system in the Makefile.systype then there is nothing to do in the Makefile.
b) In case you uncommented a line corresponding to your system in the Makefile.systype then there is nothing to do in the Makefile.
- In case you added a line, say #SYSTYPE="XXX-impi", into the Makefile.systype then you must modify the Makefile by adding the following lines in 'define available Systems'
c) In case you added a line, say #SYSTYPE="XXX-BBB", into the Makefile.systype then you must modify the Makefile by adding the following lines in 'define available Systems'
```
ifeq ($(SYSTYPE),"XXX-BBB")
......@@ -62,41 +62,29 @@ include buildsystem/Makefile.comp.XXX-BBB
include buildsystem/Makefile.path.XXX-BBB
endif
```
where XXX = system name and BBB = whatever you may want to include here, e.g., impi, openmpi, etc.
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. Either chose the existing files or create new ones that reflect your system paths and compiler.
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. Either chose the existing files or create new ones that reflect your system paths and compiler.
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.sh EXEC=gadget4-exe
```
where EXEC is the name of the executable.
5. Create a folder named Run_CollidingGalaxies. Copy gadget4-exe, and the files param.txt and TREECOOL existing in the subfolder CollidingGalaxiesSFR to Run_CollidingGalaxies.
5. Create a folder named `Run_CollidingGalaxies`. Copy gadget4-exe, and the files param.txt and TREECOOL existing in the subfolder CollidingGalaxiesSFR to `Run_CollidingGalaxies`.
6. In the folder Run_CollidingGalaxies 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.
6. In the folder `Run_CollidingGalaxies` 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 a test case executable | Case A
##### Building a Test Case Executable | Case A
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.
1. Download and untar a test case tarball, e.g., `gadget4-case-A.tar.gz` (see below) and the source code used in the benchmarks named `gadget4-benchmarks.tar.gz`. 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'
```
ifeq ($(SYSTYPE),"oblivion-impi")
include buildsystem/Makefile.comp.XXX-BBB
include buildsystem/Makefile.path.XXX-BBB
endif
```
where XXX = system name and BBB = whatever you may want to include here, e.g., impi, openmpi, etc.
2. Change to the folder named gadget4-benchmarks and adapt the file Makefile.systype and Makefile to your needs. Follow instructions 1a), 1b) or 1c) in Section "General Building of the Executable".
3. Compile the code using the Config.sh file in gadget4-case-A
......@@ -104,11 +92,11 @@ where XXX = system name and BBB = whatever you may want to include here, e.g., i
make CONFIG=../gadget4-case-A/Config.sh EXEC=../gadget4-case-A/gadget4-exe
```
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.
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.
### 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