Chapter 13

Molecular Dynamics Example

Abstract

The parallel computation of the trajectories of a set of interacting particles moving on a line is examined in detail. The particles interact through long-range, restoring forces. The parallel algorithm is simple, but it shows substantial demand on barrier synchronizations. This example is therefore a good testing ground for studying the efficiency of synchronization tools. After discussing in detail the general structure of the code, several versions are proposed, based on the different environments discussed in the book: OpenMP, TBB, and vath pools. Their performance is tested, and performance bottlenecks are identified. A rather detailed discussion is developed on the use and impact of vectorization—as ...

Get Shared Memory Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.