https://github.com/neudinger/equadiffmpi
Distributed diffusion equation C/C++ OpenMP one-sided communication MPI
https://github.com/neudinger/equadiffmpi
bash boost cmake cpp cpp14 hpc hpc-applications hpc-clusters hwloc hwloc-library mpi one-sided one-sided-jacobi openmp openmpi physics-simulation shell slurm slurm-cluster
Last synced: about 1 month ago
JSON representation
Distributed diffusion equation C/C++ OpenMP one-sided communication MPI
- Host: GitHub
- URL: https://github.com/neudinger/equadiffmpi
- Owner: neudinger
- Created: 2023-04-07T18:17:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-27T13:58:02.000Z (about 3 years ago)
- Last Synced: 2025-02-28T23:11:08.646Z (over 1 year ago)
- Topics: bash, boost, cmake, cpp, cpp14, hpc, hpc-applications, hpc-clusters, hwloc, hwloc-library, mpi, one-sided, one-sided-jacobi, openmp, openmpi, physics-simulation, shell, slurm, slurm-cluster
- Language: C++
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Distributed diffusion equation C/C++ OpenMP one-sided communication MPI
  
  
> - Cartesian split
> - Horizontal split
Hybrid computation with multiple parallel computation level :
(Cluster level) -> (Machine level) -> (CPU Level) -> (Core Level)
- Distributed parallel operations layer with MPI domain splitting.
- Multithreaded parallel operations layer with OpenMP.
- Vectorized parallel operations layer with cached blocked loops.
Usage of [HWLOC](https://www.open-mpi.org/projects/hwloc/) to gather hierarchical topology and specified thread core process binding.
Boost was used for program_options.
The cmake will download and build program_options only if boost is not found.
Only this library will be linked to reduce the library loading overhead.
## Cartesian split
```bash
rm -rf build-cartesian-split/ && \
cmake -B build-cartesian-split \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPRINT_PERF=FALSE \
-DOPENMP:BOOL=TRUE -S cartesian-split && \
cmake --build build-cartesian-split
```
## Horizontal split
Build :
```bash
rm -rf build-horizontal-split/ && \
cmake -B build-horizontal-split \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPRINT_PERF=FALSE \
-DOPENMP:BOOL=TRUE -S horizontal-split && \
cmake --build build-horizontal-split
```
Run :
```bash
mpirun \
--mca osc pt2pt \
--mca orte_base_help_aggregate false \
--mca btl_openib_allow_ib true \
--mca opal_common_ucx_opal_mem_hooks true \
-np ${1} \
./build-horizontal-split/bin/stencil \
--nbr_of_column 80000 \
--nbr_of_row 80000 \
--nbr_iters 10000 \
--ompthread_nbr ${OMP_NUM_THREADS} \
--init_val 1
```
---
C++ 17 was used due to usage of string_view and initializer_list.\
MPI for distributed layer.\
OpenMP for multithreading purpose.
This project was built with slurm as cluster node scheduler.