Commit 51362ebc authored by Alan O'Cais's avatar Alan O'Cais

Merge branch 'castagna/E-CAM-Library-dl_meso_dpd_gpu_fftw' into 'master'

Module: SPME on DL_MESO_DPD gpu

See merge request e-cam/E-CAM-Library!72
parents db95eeaa a9863cb5
......@@ -61,6 +61,7 @@ The following modules connected to the DL_MESO_DPD code have been produced so fa
.. In ReStructured Text (ReST) indentation and spacing are very important (it is how ReST knows what to do with your
document). For ReST to understand what you intend and to render it correctly please to keep the structure of this
template. Make sure that any time you use ReST syntax (such as for ".. sidebar::" below), it needs to be preceded
and followed by white space (if you see warnings when this file is built they this is a common origin for problems).
.. Firstly, let's add technical info as a sidebar and allow text below to wrap around it. This list is a work in
progress, please help us improve it. We use *definition lists* of ReST_ to make this readable.
.. sidebar:: Software Technical Information
Fortran, CUDA-C.
`BSD <>`_, v. 2.7 or later
Documentation Tool
ReST files
Application Documentation
See the `DL_MESO Manual <>`_
Relevant Training Material
See `DL_MESO webpage <>`_
Software Module Developed by
Jony Castagna
.. In the next line you have the name of how this module will be referenced in the main documentation (which you can
reference, in this case, as ":ref:`example`"). You *MUST* change the reference below from "example" to something
unique otherwise you will cause cross-referencing errors. The reference must come right before the heading for the
reference to work (so don't insert a comment between).
.. _dl_meso_dpd_gpu_fftw:
SPME on DL_MESO_DPD (GPU version)
.. Let's add a local table of contents to help people navigate the page
.. contents:: :local:
.. Add an abstract for a *general* audience here. Write a few lines that explains the "helicopter view" of why you are
creating this module. For example, you might say that "This module is a stepping stone to incorporating XXXX effects
into YYYY process, which in turn should allow ZZZZ to be simulated. If successful, this could make it possible to
produce compound AAAA while avoiding expensive process BBBB and CCCC."
The electrostatic force calculation usually represents the main computational costs in systems where even a small amount of charged particles are present (>1%).
The Smooth Particle Mesh Ewald [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 contributions. For the long range force the electrical charges are spread on a virtual particle mesh using a B-spline interpolation function.
Porting the full short and long range interactions to GPUs allowed us to achieve a speedup factor of 4x when compared to a traditional 12-core Intel CPU.
One of the main applications which includes electrical charges are the simulations of plasma.
Purpose of Module
.. Keep the helper text below around in your module by just adding ".. " in front of it, which turns it into a comment
The Ewald summation method scales with :math:`N^{1.5}` at best, where N is the number of charged particles. The SPME method allows for improved scaling, :math:`N*log(N)`,
but requires a stencil domain decomposition (i.e. decomposing the domain along one direction only) to allow the FFTW library to scale with more than 1 core.
If this is not used, as in the current master version of DL\_MESO\_DPD, FFTW rapidly becomes a bottleneck for scaling across several nodes.
On the other hand, the porting to a single GPU does not need domain decomposition and the same speedup factor (4x compared to 12-core Intel) is maintained.
Background Information
.. Keep the helper text below around in your module by just adding ".. " in front of it, which turns it into a comment
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
Please contact Dr. Micheal Seaton at Daresbury Laboratory (STFC) for further details.
Building and Testing
.. Keep the helper text below around in your module by just adding ".. " in front of it, which turns it into a comment
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 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
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".
Source Code
.. Notice the syntax of a URL reference below `Text <URL>`_ the backticks matter!
This module has been merged into DL_MESO code. It is composed of the
following commits (you need to be register as developer):
.. [SPME] J. Chem. Phys. 103, 8577 (1995)
.. _ReST:
.. _Sphinx:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment