Ewald on DL_MESO_DPD (GPU version)

The electrostatic force calculation represent usually the main computational costs in systems where even a small amount of charged particles is present ($>1%$). The Smooth Particle Ewald Mesh cite{SPME} splits the electrostatic forces in two parts: a short range, solved in the real space, and a long range, solved in the Fourier space. An error weight function combines the two contributes. For the long range force the electrical charges are spread on a virtual particle mesh using a B-spline interpolation function.

Porting to GPU the full short and long range interactions allowed to maintain the speedup factor of $x4$ when compared to the a traditional Intel 12-core.

One of the main applications which included electrical charges are the simulations of plasma.

Purpose of Module

The Ewald summation method above described scales with $N^{1.5}$ at best, where N is the number of charged particles. The SPME allows a better scaling, $N*log(N)$, but requires a stencil domain decomposition (i.e. decomposing the domain along one direction only) to allow the FFTW library scaling with more than 1 core. If this is not used, as in the current master version of DL_MESO_DPD, the FFTW becomes rapidly a bottleneck for scaling across several nodes. On the other side, the porting to a single GPU does not need domain decomposition and the same speedup factor ($x4$ compared to 12-core Intel) is mainteined.

Background Information

This module is part of the DL_MESO_DPD code. Full support and documentation is available at:

To download the DL_MESO_DPD code you need to register at https://gitlab.stfc.ac.uk/dl_meso/dl_meso. Please contact Dr. Micheal Seaton at Daresbury Laboratory (STFC) for further details.

Building and Testing

The DL_MESO code is developed using git version control. Currently the GPU version is under a branch named “add_gpu_version”. After downloading the code, checkout to the GPU branch and look into the “DPD/gpu_version” folder, i.e:

  • git clone DL_MESO_repository_path
  • cd dl_meso
  • git checkout gpu_version
  • cd /DPD/gpu_version
  • make all

To compile and run the code you need to have installed the CUDA-toolkit and have a CUDA enabled GPU device (see http://docs.nvidia.com/cuda/#axzz4ZPtFifjw).

To run the case, compile the code using the “make all” command from the “bin” directory, copy the “FIELD” and “CONTROL” files in this directory and run “./dpd_gpu.exe”. The DL_MESO code is developed using git version control. Currently the GPU version is under a branch named “add_gpu_version”. After downloading the code, checkout to the GPU branch and look into the “DPD/gpu_version” folder, i.e:

Source Code

This module has been merged into DL_MESO code. It is composed of the following commits (you need to be register as developer):