An open API service indexing awesome lists of open source software.

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.

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©*