-
Notifications
You must be signed in to change notification settings - Fork 4
Quickstart
- HDF5 (1.8+)
- A C++ compiler compatible with C++17
- CMake (3.16+)
To clone FV2D, you need to clone the repository and the submodules. To do so from scratch:
git clone --recurse-submodules git@github.com:mdelorme/fv2d.gitIf you have already cloned the repo but forgot to add the --recurse-submodules, you can still get the submodules by typing at the root of fv2d the following commands:
git submodule init
git submodule updateBuilding relies on CMake. As FV2D is built with Kokkos included as a submodule, all Kokkos option have to be passed here. For more information on how to indicate which architecture/compiler you wish to use with Kokkos, please refer to the Kokkos documentation. Here are a few examples of build commands for FV2D depending on the architecture :
mkdir build_cpu
cd build_cpu
CC=clang CXX=clang++ cmake -DKokkos_ENABLE_OPENMP=ON -DCMAKE_BUILD_TYPE=Release ..mkdir build_nvgpu
cd build_nvgpu
CC=clang CXX=clang++ cmake -DKokkos_ENABLE_CUDA=ON -DCMAKE_BUILD_TYPE=Release ..Note: using nvcc and not clang for compiling with CUDA might lead to problems because of an incompatibility between nvcc and HighFive the hdf5 wrapper used in this project.
mkdir build_amdgpu
cd build_amdgpu
CC=hipcc CXX=hipcc cmake -DKokkos_ENABLE_HIP=ON -DCMAKE_BUILD_TYPE=Release ..Once the program has been successfully configured, you can build the code :
make -jAt the end of the compilation, an executable fv2d should be created in the build folder.
To use fv2d simply run the fv2d executable and provide a .ini file on the command line. For instance, if you are in a build folder located right below the root of fv2d, you can run a test by typing :
./fv2d ../settings/blast.iniThe code will start outputting information :
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░ ░░ ░░░░░░░░░ ░░░░░░░░░░░░░░░░░ ░
▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ▒▒▒ ▒ ▒▒▒▒▒▒▒▒▒ ▒
▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒ ▒
▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓ ▓
▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓ ▓
▓ ▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓ ▓
█ █████████████ ███████ ███ █ █
███████████████████████████████████████████████
Computing dts at (t=0) : dt_hyp=0.000521995; dt_TC=1e+06; dt_visc=1e+06
- Saving at time 0
Computing dts at (t=0.000551063) : dt_hyp=0.000480941; dt_TC=1e+06; dt_visc=1e+06
Computing dts at (t=0.00106851) : dt_hyp=0.000459815; dt_TC=1e+06; dt_visc=1e+06
...
Each reporting line indicate the current time t and the timesteps associated with each physical process. dt_hyp is the hyperbolic time step associated with the hydro update, dt_TC the time step associated with thermal conduction, and finally dt_visc the viscous time step.
Once the execution is finished, the code displays a "goodbye" message :
█ ▀██ ▀██ ▀██ ▄█▄
███ ██ ██ ▄▄ ██ ▄▄▄ ▄▄ ▄▄▄ ▄▄▄▄ ███
█ ██ ██ ██ ▄▀ ▀██ ▄█ ▀█▄ ██ ██ ▄█▄▄▄██ ▀█▀
▄▀▀▀▀█▄ ██ ██ █▄ ██ ██ ██ ██ ██ ██ █
▄█▄ ▄██▄ ▄██▄ ▄██▄ ▀█▄▄▀██▄ ▀█▄▄█▀ ▄██▄ ██▄ ▀█▄▄▄▀ ▄
▀█▀