Molecular Dynamics Example
暂无分享,去创建一个
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 a single-core optimization option—in enhancing application performance.