Commit 04a535be authored by Miguel Avillez's avatar Miguel Avillez
Browse files

Update gadget/4.0/README.md

parent 47c35fb3
......@@ -19,34 +19,37 @@ Building the GADGET code requires a compiler with full C++11 support, MPI (e.g.,
module load OpenMPI/4.0.3 HDF5/1.10.6 FFTW/3.3.8 GSL/2.6
```
### Download the source code
### Source Code and Initial Conditions
Latest Release can be downloaded from [https://gitlab.mpcdf.mpg.de/vrs/gadget4](https://gitlab.mpcdf.mpg.de/vrs/gadget4)
##### Source Code Release
or get a cloned repository of the code by using
Latest release of the code can be downloaded from [https://gitlab.mpcdf.mpg.de/vrs/gadget4](https://gitlab.mpcdf.mpg.de/vrs/gadget4)
or clone the repository by
```
git clone http://gitlab.mpcdf.mpg.de/vrs/gadget4
```
In this repository you can download:
##### In this UEABS repository you can find:
- A cloned version of the code (version of June 22, 2021): [gadget4.tar.gz](./gadget/4.0/gadget4.tar.gz)
This tarball includes the `src` code, `examples`, `buildsystem`, and `documentation` folders. It also includes **Makefile** and **Makefile.systype** (or a template) files.
- The code used in the benchmarks (version of June 22, 2021):[gadget4-benchmarks.tar.gz](./gadget/4.0/gadget4-benchmarks.tar.gz)
- Examples initial conditions from [example_ics.tar.gz](./gadget/4.0/example_ics.tar.gz)
It includes initial conditions for each of the examples. When untarred you generate a folder named `ExampleICs`.
### Build 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 `src` code, `examples`, `buildsystem`, and `documentation` folders. It also includes **Makefile** and **Makefile.systype** (or a template)
1. Two files are need from the repository: [gadget4.tar.gz](./gadget/4.0/gadget4.tar.gz) and [example_ics.tar.gz](./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**.
2. After decompressing gadget4.tar.gz go to the master folder named `gadget4`. There are two files that need modification: **Makefile.systype** and **Makefile**.
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.,
```
......@@ -65,28 +68,32 @@ include buildsystem/Makefile.path.XXX-BBB
endif
```
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. 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. 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
5. 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`.
6. 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.
7. 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.
8. Run the code using mpirun or submit a SLURM script.
##### Building a Test Case Executable | Case A
1. Download and untar a test case tarball, e.g., [gadget4-case-A.tar.gz](./gadget/4.0/gadget4-case-A.tar.gz) (see below) and the source code used in the benchmarks named [gadget4-benchmarks.tar.gz](./gadget/4.0/gadget4-benchmarks.tar.gz). The folder `gadget4-case-A` has the files **Config.sh**, **ics_collision_g4.dat**, **param.txt**, **TREECOOL**, and **slurm_script.sh**. 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](./gadget/4.0/gadget4-case-A.tar.gz) (see below) and the source code used in the benchmarks named [gadget4-benchmarks.tar.gz](./gadget/4.0/gadget4-benchmarks.tar.gz). The folder `gadget4-case-A` has the **Config.sh**, **ics_collision_g4.dat**, **param.txt**, **TREECOOL**, **slurm_script.sh**, and **README** files.
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.
The **README** file describes the setup and run of the code in a supercomputer. Use this as an example of what to expect in other machines.
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".
2. Change to the folder named `gadget4-benchmarks` and adapt the file **Makefile.systype** and **Makefile** to your needs. Follow instructions 2a), 2b) or 2c) in Section "General Building of the Executable".
3. Compile the code using the **Config.sh** file in `gadget4-case-A`
......
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