By S. J. Pennycook, C. J. Hughesy, M. Smelyanskiyy and S. A. Jarvis
We analyse gather-scatter performance bottlenecks in molecular dynamics codes and the challenges that they pose for obtaining benefits from SIMD execution. This analysis informs a number of novel code-level and algorithmic improvements to Sandia’s miniMD benchmark, which we demonstrate using three SIMD widths (128-, 256- and 512- bit). The applicability of these optimisations to wider SIMD is discussed, and we show that the conventional approach of exposing more parallelism through redundant computation is not necessarily best.
In single precision, our optimised implementation is up to 5x faster than the original scalar code running on Intel® Xeon® processors with 256-bit SIMD, and adding a single Intel® Xeon Phi™ coprocessor provides up to an additional 2x performance increase. These results demonstrate: (i) the importance of effective SIMD utilisation for molecular dynamics codes on current and future hardware; and (ii) the considerable performance increase afforded by the use of Intel® Xeon Phi™ coprocessors for highly parallel workloads.
This article is part of the Intel® Modern Code Developer Community documentation which supports developers in leveraging application performance in code through a systematic step-by-step optimization framework methodology. This article addresses: vector level parallelization.