Simple optimizations for LAMMPS

Veerapong Kaewtes, Paruj Ratanaworabhan · 2014

LAMMPS, Large-scale Atomic/Molecular Massively Parallel Simulator, is an important molecular dynamic simulator used by a growing number of scientists and engineers. Previous studies have shown that there are limited opportunities to optimize its source; no more than 2% and 18% serial and parallel speedup, respectively, were obtained over the original source. So, LAMMPS optimizations need to done with heavy-handed approaches, making algorithmic changes and employing platform specific instructions. Although the resulting speedup can be considerable, the source becomes less portable. This study investigates simple portable source-code transformation to improve LAMMPS runtime performance. To our surprise, these small optimizations buy us a non-trivial amount of performance improvement. This paper explains why these optimizations work and why they are difficult for the hardware and compilers to perform. Thus, manual source transformation is needed. The final result shows a performance improvement of around 20% over the original source while the improvement due to instruction reordering alone is about 6%.

Read the paper · More papers on PaperTik