VecDualSPHysics

VecDualSPHysics: a vectorized implementation of smoothed particle hydrodynamics method for simulating fluid flows on multi-core processors. As one of the most promising mesh-free numerical approaches, the Smoothed Particle Hydrodynamics (SPH) algorithm can be used for simulating many engineering problems. However, it is necessary to fully exploit the performance of computing processors for realizing extremely large-scale parallel simulations. In this paper, we focused on maximizing the performance of a SPH program by vectorizing on modern multi-core processors. We summarize the general principles of vectorization including the branch vectorization, vector reduction and instruction set optimization approaches. Then, a vectorized version VecDualSPHysics was implemented based on these basic vectorization principles. Experiments show that VecDualSPHysics has a significant performance improvement over the original DualSPHysics. By using AVX2 instruction set combined with OpenMP, we obtained up to 4.3x speedups on a single multi-core processor, and the maximal speedup is 6.3x for AVX-512 instruction set, which is much faster than the pure OpenMP-based multi-threading version. The VecDualSPHysics shows the great potential of exploiting the performance of multi-core processors by vectorization and can further be used to optimize the massively parallel SPH simulations.