PhasicFlow is a parallel C++ code for performing DEM simulations. It can run on shared-memory multi-core computational units such as multi-core CPUs or GPUs (for now it works on CUDA-enabled GPUs). The parallelization method mainly relies on loop-level parallelization on a shared-memory computational unit. You can build and run PhasicFlow in serial mode on regular PCs, in parallel mode for multi-core CPUs, or build it for a GPU device to off-load computations to a GPU.
PhasicFlow should work with every gnu compiler that implements C++17 standards. For now, it is tested on Ubuntu distribution of Linux operating systems. If the minimum requirements are met, there should not be any problem with compiling the code. However, there are always compiler bugs from one version to another that may need you extra attempts for upgrading to newer versions or downgrading to prior versions of the compiler.
PhasicFlow uses [Kokkos]( https://github.com/kokkos/kokkos) as the backend for parallelization. So, you need to have the code in the local machine alongside PhasicFlow. The make system is adjusted in a way so you do not need to compile Kokkos separately and the required source code files from Kokkos are compiled alongside the PhasicFlow.
You also need to have CMake installed on your computer. At the moment CMake-3.22 or higher is needed.
### tbb
For now, some parallel algorithms rely on tbb parallel library (C++ parallel backend). This dependency will be removed soon. Use the following commands to install it:
PhasicFlow uses CMake as the build system. you need to have CMake-3.22 or higher installed on your machine. you can either use the command line for setting-up the build system, or use `cmake-gui` to setup your build system through the GUI.
### Step 1:
Make sure you have installed all the required packages on your computer (tbb and CMake and compilers).
### Step 2: Cloning Kokkos
It is assumed that Kokkos source is located in the home folder of your OS. Clone the current version of Kokkos into your home folder:
or simply download and extract the source code of Kokkos in `~/Kokkos` folder. In the end, the top level CMakeLists.txt file should be located in `~/Kokkos/kokkos` folder.
### Step 3: Cloning PhasicFlow
Create the PhasicFlow folder in your home folder and then clone the source code into that folder:
* Extending high-level parallelization and implementing space partitioning and load balancing for muilti-GPU computations and running PhasicFlow on distributed memory super-computers