CUDA and OpenMP versions of SPH (Smoothed Particle Hydrodynamics) serial algorithm.
The GCC compiler is used to build the code.
For this project are available:
- 4 OpenMP parallelized versions
- 2 CUDA parallelized versions.
Note
The make command must be run in the src folder.
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
To build all CUDA versions: make cuda
In alternativa:
nvcc cuda-sph.cu -o cuda-sph
nvcc cuda-sphv2.cu -o cuda-sphv2
See the Report.
Marco Sangiorgi
2023©