An Interface For Halo Exchange Pattern
Mauro Bianco · Zenodo (CERN European Organization for Nuclear Research) · 2013
Halo exchange patterns are very common in scientific computing, since the solution of PDEs often requires communication between neighbor points. Although this is a common pattern, implementations are often made by programmers from scratch, with an accompanying feeling of “reinventing the wheel”. In this paper we describe GCL, a C++ generic library that implements a flexible and still efficient interface to specify halo-exchange/haloupdate operations for regular grids. GCL allows to specify data layout, processor mapping, value types, and other parameters at compile time, while other parameters are specified at run-time. GCL is also GPU enabled and we show that, somewhat surprisingly, GPU-to-GPU communication can be faster than the traditional CPUto- CPU communication, making accelerated platforms more appealing for large scale computations.