Code refactoring of HPC applications for multicore processors

Teck Seng Low · DR-NTU (Nanyang Technological University) · 2012

Speed has always been one of the most important components for computing system benchmarking. In this report, we present an Eclipse-based user-guided refactoring plug-in that assists the users to refactor sequential C++ programs for parallelism. This refactoring plug-in will use the Intel Threading Building Block (TBB) parallel library to achieve parallelism. This plug-in will help the users to identify Standard Template Library (STL) vector and refactor to the corresponding TBB containers to ensure thread-safety. The parallelism can be achieved by using the TBB parallel_for function to replace loops. This plug-in will also help the user to identify all the vector iterators for-loops and allow them to select and refactor to the equivalent parallel operations. At the end of this report, we used this plug-in to refactor an actual application, N-Body Simulation, and benchmarked the performance. The result showed that the performance was increased by 8 times when running on an eight-core machine.

Read the paper · More papers on PaperTik