https://github.com/sangioai/sph
CUDA and OpenMP versions of SPH (Smoothed Particle Hydrodynamics) serial algorithm.
https://github.com/sangioai/sph
cuda openmp
Last synced: about 2 months ago
JSON representation
CUDA and OpenMP versions of SPH (Smoothed Particle Hydrodynamics) serial algorithm.
- Host: GitHub
- URL: https://github.com/sangioai/sph
- Owner: sangioai
- License: mit
- Created: 2024-10-06T20:33:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-30T16:16:43.000Z (over 1 year ago)
- Last Synced: 2025-07-02T08:10:47.165Z (12 months ago)
- Topics: cuda, openmp
- Language: C
- Homepage:
- Size: 1.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SPH
CUDA and OpenMP versions of [SPH](https://github.com/cerrno/mueller-sph) (Smoothed Particle Hydrodynamics) serial algorithm.
# Dependencies
The GCC compiler is used to build the code.
# Build
For this project are available:
- 4 OpenMP parallelized versions
- 2 CUDA parallelized versions.
> [!Note]
> The `make` command must be run in the *src* folder.
## OpenMP versions
To build all OpenMP versions: `make openmp`
To build them indipendently:
```
gcc -std=c99 -fopenmp -Wall -Wpedantic omp-sph.c -o omp-sph -lm
gcc -std=c99 -fopenmp -Wall -Wpedantic omp-sphv2.c -o omp-sph -lm
gcc -std=c99 -fopenmp -Wall -Wpedantic omp-sphv3.c -o omp-sph -lm
gcc -std=c99 -fopenmp -Wall -Wpedantic omp-sphv4.c -o omp-sph -lm
```
## CUDA versions
To build all CUDA versions: `make cuda`
In alternativa:
```
nvcc cuda-sph.cu -o cuda-sph
nvcc cuda-sphv2.cu -o cuda-sphv2
```
# Results
See the [Report](Report.pdf).
## Authors
[Marco Sangiorgi](https://github.com/SangioAI)
*2023©*