Accelerating molecular dynamics codes by performance and accuracy modeling

Abstract Scientific software is often driven by multiple parameters that affect both accuracy and performance. Since finding the optimal configuration of these parameters is a highly complex task, it is extremely common that the software is used suboptimally. In a typical scenario, accuracy requirements are imposed, and attained through suboptimal performance. In this paper, we present a methodology for the automatic selection of parameters for simulation codes, and a corresponding prototype tool. To be amenable to our methodology, the target code must expose the parameters affecting accuracy and performance, and there must be formulas available for error bounds and computational complexity of the underlying methods. As a case study, we consider the particle–particle particle–mesh method (PPPM) from the LAMMPS suite for molecular dynamics, and use our tool to identify configurations of the input parameters that achieve a given accuracy in the shortest execution time. When compared with the configurations suggested by expert users, the parameters selected by our tool yield reductions in the time-to-solution ranging between 10% and 60%. In other words, for the typical scenario where a fixed number of core-hours are granted and simulations of a fixed number of timesteps are to be run, usage of our tool may allow up to twice as many simulations. While we develop our ideas using LAMMPS as computational framework and use the PPPM method for dispersion as case study, the methodology is general and valid for a range of software tools and methods.

[1]  Rolf E. Isele-Holder,et al.  Development and application of a particle-particle particle-mesh Ewald method for dispersion interactions. , 2012, The Journal of chemical physics.

[2]  T. Darden,et al.  Particle mesh Ewald: An N⋅log(N) method for Ewald sums in large systems , 1993 .

[3]  Christian Holm,et al.  How to mesh up Ewald sums. I. A theoretical and numerical comparison of various particle mesh routines , 1998 .

[4]  I-Hsin Chung,et al.  Active Harmony: Towards Automated Performance Tuning , 2002, ACM/IEEE SC 2002 Conference (SC'02).

[5]  E. Süli,et al.  A note on the design of hp-adaptive finite element methods for elliptic partial differential equations , 2005 .

[6]  David J. Hardy,et al.  Multilevel summation for the fast evaluation of forces for the simulation of biomolecules , 2006 .

[7]  Jianpeng Ma,et al.  CHARMM: The biomolecular simulation program , 2009, J. Comput. Chem..

[8]  H. G. Petersen Accuracy and efficiency of the particle mesh Ewald method , 1995 .

[9]  T. Darden,et al.  A smooth particle mesh Ewald method , 1995 .

[10]  Frank Mueller,et al.  Cross-Platform Performance Prediction of Parallel Applications Using Partial Execution , 2005, ACM/IEEE SC 2005 Conference (SC'05).

[11]  Marjorie A. McClain,et al.  A Survey of hp-Adaptive Strategies for Elliptic Partial Differential Equations , 2011 .

[12]  Laxmikant V. Kalé,et al.  Scalable molecular dynamics with NAMD , 2005, J. Comput. Chem..

[13]  Steven G. Johnson,et al.  The Design and Implementation of FFTW3 , 2005, Proceedings of the IEEE.

[14]  Jesús Labarta,et al.  A Framework for Performance Modeling and Prediction , 2002, ACM/IEEE SC 2002 Conference (SC'02).

[15]  Franz Franchetti,et al.  SPIRAL: Code Generation for DSP Transforms , 2005, Proceedings of the IEEE.

[16]  Steve Plimpton,et al.  Fast parallel algorithms for short-range molecular dynamics , 1993 .

[17]  Christian Holm,et al.  Optimizing working parameters of the smooth particle mesh Ewald algorithm in terms of accuracy and efficiency. , 2010, The Journal of chemical physics.

[18]  M. Shiga,et al.  Rapid estimation of elastic constants by molecular dynamics simulation under constant stress , 2004 .

[19]  J. Perram,et al.  Cutoff Errors in the Ewald Summation Formulae for Point Charge Systems , 1992 .

[20]  Sadaf R. Alam,et al.  Performance modeling of microsecond scale biological molecular dynamics simulations on heterogeneous architectures , 2013, Concurr. Comput. Pract. Exp..

[21]  M. Deserno,et al.  HOW TO MESH UP EWALD SUMS. II. AN ACCURATE ERROR ESTIMATE FOR THE PARTICLE-PARTICLE-PARTICLE-MESH ALGORITHM , 1998, cond-mat/9807100.

[22]  Rolf E. Isele-Holder,et al.  Reconsidering Dispersion Potentials: Reduced Cutoffs in Mesh-Based Ewald Solvers Can Be Faster Than Truncation. , 2013, Journal of chemical theory and computation.

[23]  Jack J. Dongarra,et al.  Automatically Tuned Linear Algebra Software , 1998, Proceedings of the IEEE/ACM SC98 Conference.

[24]  R W Hockney,et al.  Computer Simulation Using Particles , 1966 .

[25]  Paolo Bientinesi,et al.  The ELAPS framework: Experimental Linear Algebra Performance Studies , 2015, Int. J. High Perform. Comput. Appl..

[26]  Eamonn J. Keogh,et al.  Segmenting Time Series: A Survey and Novel Approach , 2002 .

[27]  D. van der Spoel,et al.  GROMACS: A message-passing parallel molecular dynamics implementation , 1995 .

[28]  H. Stern,et al.  On mesh-based Ewald methods: optimal parameters for two differentiation schemes. , 2008, The Journal of chemical physics.

[29]  Alan Edelman,et al.  PetaBricks: a language and compiler for algorithmic choice , 2009, PLDI '09.