A flexible algorithm for calculating pair interactions on SIMD architectures

被引:518
作者
Pall, Szilard
Hess, Berk [1 ]
机构
[1] KTH Royal Inst Technol, Dept Theoret Phys, S-10691 Stockholm, Sweden
基金
欧洲研究理事会;
关键词
Pair interactions; SIMD; GPU; Molecular dynamics; Verlet list; MOLECULAR-DYNAMICS SIMULATIONS; GRAPHICS PROCESSING UNITS; MODELS;
D O I
10.1016/j.cpc.2013.06.003
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Calculating interactions or correlations between pairs of particles is typically the most time-consuming task in particle simulation or correlation analysis. Straightforward implementations using a double loop over particle pairs have traditionally worked well, especially since compilers usually do a good job of unrolling the inner loop. In order to reach high performance on modern CPU and accelerator architectures, single-instruction multiple-data (SIMD) parallelization has become. essential. Avoiding memory bottlenecks is also increasingly important and requires reducing the ratio of memory to arithmetic operations. Moreover, when pairs only interact within a certain cut-off distance, good SIMD utilization can only be achieved by reordering input and output data, which quickly becomes a limiting factor. Here we present an algorithm for SIMD parallelization based on grouping a fixed number of particles, e.g. 2, 4, or 8, into spatial clusters. Calculating all interactions between particles in a pair of such clusters improves data reuse compared to the traditional scheme and results in a more efficient SIMD parallelization. Adjusting the cluster size allows the algorithm to map to SIMD units of various widths. This flexibility not only enables fast and efficient implementation on current CPUs and accelerator architectures like GPUs or Intel MIC, but it also makes the algorithm future-proof. We present the algorithm with an application to molecular dynamics simulations, where we can also make use of the effective buffering the method introduces. (C) 2013 Elsevier B.V. All rights reserved.
引用
收藏
页码:2641 / 2650
页数:10
相关论文
共 24 条
[1]   General purpose molecular dynamics simulations fully implemented on graphics processing units [J].
Anderson, Joshua A. ;
Lorenz, Chris D. ;
Travesset, A. .
JOURNAL OF COMPUTATIONAL PHYSICS, 2008, 227 (10) :5342-5359
[2]  
[Anonymous], 2013, BIOINFORMATICS
[3]  
[Anonymous], CUDA C PROGR GUID
[4]   THE MISSING TERM IN EFFECTIVE PAIR POTENTIALS [J].
BERENDSEN, HJC ;
GRIGERA, JR ;
STRAATSMA, TP .
JOURNAL OF PHYSICAL CHEMISTRY, 1987, 91 (24) :6269-6271
[5]   Implementing molecular dynamics on hybrid high performance computers - short range forces [J].
Brown, W. Michael ;
Wang, Peng ;
Plimpton, Steven J. ;
Tharrington, Arnold N. .
COMPUTER PHYSICS COMMUNICATIONS, 2011, 182 (04) :898-911
[6]  
Eastman P., 2009, J COMPUT CHEM, V31, P1
[7]   A SMOOTH PARTICLE MESH EWALD METHOD [J].
ESSMANN, U ;
PERERA, L ;
BERKOWITZ, ML ;
DARDEN, T ;
LEE, H ;
PEDERSEN, LG .
JOURNAL OF CHEMICAL PHYSICS, 1995, 103 (19) :8577-8593
[8]   Accelerating Molecular Dynamic Simulation on Graphics Processing Units [J].
Friedrichs, Mark S. ;
Eastman, Peter ;
Vaidyanathan, Vishal ;
Houston, Mike ;
Legrand, Scott ;
Beberg, Adam L. ;
Ensign, Daniel L. ;
Bruns, Christopher M. ;
Pande, Vijay S. .
JOURNAL OF COMPUTATIONAL CHEMISTRY, 2009, 30 (06) :864-872
[9]   A simple algorithm to accelerate the computation of non-bonded interactions in cell-based molecular dynamics simulations [J].
Gonnet, Pedro .
JOURNAL OF COMPUTATIONAL CHEMISTRY, 2007, 28 (02) :570-573
[10]   GROMACS 4: Algorithms for highly efficient, load-balanced, and scalable molecular simulation [J].
Hess, Berk ;
Kutzner, Carsten ;
van der Spoel, David ;
Lindahl, Erik .
JOURNAL OF CHEMICAL THEORY AND COMPUTATION, 2008, 4 (03) :435-447