Code modernisation, a practical approach

Two real world case studies and Intel tools for finding performance bottlenecks

Code modernisation is about (re)writing code with the purpose of making optimal use of today’s (and tomorrow’s) computers. While a suboptimal computational performance of a code running on your desktop may be acceptable because it affects only you, codes running on HPC systems costing 1 M€ or more which use only a fraction of the machine capacity cannot be allowed.

We start with a short review of important aspects of computer architecture affecting performance and continues to show how to determine the performance of a code, by means of simple back-of-the envelope-calculations, as well as using sophisticated tools from the Intel Cluster Studio, such as Intel Advisor and Intel VTune. We demonstrate how to these tools can discover hot spots and their causes.

We will examine some frequent causes of bad performance by studying two common scientific problems, the simulation of atomistic systems in a Monte Carlo setting, and in a Molecular Dynamics setting. Surprisingly, the most frequent cause of bad performance turns out to be the way how data are accessed, rather than algorithmic complexity or how many instructions your need to solve the problem. We will demonstrate how space filling curves like the Hilbert curve provide an efficient solution for fixing bad data access patterns in the simulation of atomistic systems (among other applications).

This talk also touches upon arguments for choosing between (or combining) different programming languages (Fortran, C/C++, Python) for high performance computing.