Skip to content

Parallel Smoothed Particle Hydrodynamics algorithm (SPH).

License

Notifications You must be signed in to change notification settings

drudilorenzo/parallel-sph-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parallel-sph-algorithm

Parallel implementation of the Smoothed Particle Hydrodynamics algorithm developed for the High Performance Computing programming project (Academic Year 2022/2023).

Parallel version of Müller's "Particle-Based Fluid Simulation for Interactive Applications".

Paper

Repo

It offers:

How to Compile

Run all the commands in the src directory.

  • make all: builds all the versions (default)
  • make serial: builds the non-GUI serial version
  • make serial: builds the GUI serial version
  • make omp: builds the omp version
  • make mpi: builds the mpi version
  • make clean: clean up executables (NOT stats files)

How to Run

Max input size: 20000.
Default params: Particles: 500, Steps: 50.

  • Serial: ./sph ${INPUT_SIZE} ${NUM_STEPS}
    (e.g. ./sph 500 to run with 500 particles and 50 steps)
  • GUI: ./sph.gui ${INPUT_SIZE}
    (e.g. ./sph.gui 500 to run with 500 particles)
  • OpenMP: OMP_NUM_THREADS=${NUM_THREADS} omp-sph ${NUM_PARTICLES} ${NUM_STEPS}
    (e.g. OMP_NUM_THREADS=4 omp-sph 500 to run with 4 threads, 500 particles and 50 steps)
  • MPI: mpirun -n ${NUM_CORES} mpi-sph ${NUM_PARTICLES} ${NUM_STEPS}
    (e.g. mpirun -n 4 mpi-sph 500 to run with 4 cores, 500 particles and 50 steps)

Stats

Stats files are added into the stats directory

  • make stats: builds all and run the stats scripts (see scripts directory)
  • make clean-stats: clean up stats files

Scripts:

Each script executes the program several times increasing the number of threads/cores from 1 to the number available on your machine. Each execution is repeated 5 times. The cycle is done two times:

  1. The input size remains constant and the number of threads/cores increases. Execution times are useful to compute speedup and strong scaling efficiency;
  2. The amount of work done by each thread/core remain constant. Execution times are useful to compute weak scaling efficiency.

The docs directory contains the benchmarks of the two parallel versions using the following hardware:

  • Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz (no Hyper-Threading);
  • RAM 64Gb.

About

Parallel Smoothed Particle Hydrodynamics algorithm (SPH).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published