The report can be found in this directory via report.pdf.
- CMake >3.11
- C++ 17/20
- Python 3
Run the following commands, after you have cloned the repository:
mkdir build
cd build
cmake ..
make
The CMake infrastructure will automatically download all necessary libraries.
The documentation is built using doxygen and publicly available: https://maede97.github.io/HPC4WC-Project
Unittests are automatically built and run on Windows and Ubuntu, both in Release and Debug mode. See folder tests.
After you have completed the build instructions, run the unittest binary using
./tests/unittests
from within the build
folder.
Our example program is diffusion2d
. In order to get the fields plotted as shown in the report, execute the following commands (assuming you have completed the step Build Instructions, execute the steps from the build
folder):
./src/executables/diffusion2d --plotting=true
python3 ../scripts/showmat.py initial.mat initial.png
python3 ../scripts/showmat.py final.mat final.png
This will generate the plots for the initial and final field values.
Our code is designed that it can be run on Piz Daint. To enable everything, log in and clone this repository. Then, run the following commands:
cd scripts
bash create_env.sh
bash cmake.sh
This will create a virtual environment using python and installing a suitable CMake version. Afterwards, cmake.sh
will load the environment and start the cmake-process. Running make
can then be done without the virtual environment being active. If you have to active it yourself, execute the following two lines:
cd ~
source hpc_env/bin/activate
In order to reproduce the results on Piz Daint, create the environment as mentioned above and execute the following lines:
cd scripts/slurm
bash block_ij.sh
Remember to change the parameters inside the src/executables/block_ij.cpp
binary.
In order to run the compile-time versions, checkout the compile-time
branch and there execute block_ij_compiletime.py
from the scripts
folder (and change the parameters in it and the parameters inside of src/executables/diffusion2d.cpp
).