This page contains a Flash digital edition of a book.
heterogeneous computing


The development of accelerators and programming tools (courtesy of AMD)


knowledge they are presently available from The Portland Group, CAPS, PathShare and Cray.


Striving for standardised directives So far, though, these directives are compatible only with specifi c compilers. Cray, explains Bolding, has years of experience with heterogeneous programming, because while that company is now adopting GPUs, in the past they’ve sold systems with other accelerators such as scalar and vector processors. Cray ships its own compilers and directives with its computers, and the company wants to make them standardised OpenMP directives. ‘If we don’t have standardised directives, GPUs will never become pervasive,’ he believes. GPU support from The Portland


Group goes far beyond just directives. Its PGI Cuda C/C++ for x86 allows Cuda C developers to compile programs to run on systems based on 32- and 64-bit x86 processors from AMD and Intel. Cuda C programs compiled for x86 can run on systems either with or without a GPU installed. PGI recently began shipping the performance-optimised version of Cuda-x86, and while performance of a Cuda program on a CPU isn’t likely to reach the same level as it would on a GPU, this supplier believes it should be competitive to programs written using


28 SCIENTIFIC COMPUTING WORLD


THEY HAVE TAKEN THIS


PROGRAMMING MODEL AND ARE PROPOSING IT AS A STANDARD, OPENHMPP, WHERE THE


PRIMARY GOAL IS TO GIVE END USERS A STRONG SAY IN HOW THE STANDARD DEVELOPS


other parallel programming models such as OpenMP. As for compiler directives, PGI


Accelerator Fortran and C compiler let users tap the performance of x64+GPU systems using them much as they do with OpenMP on x64 systems. The compilers automatically analyse the entire program structure and data, split portions of the application between the x64 CPU and GPU as specified by user directives, then define and generate an optimised mapping of loops to automatically use the parallel cores, hardware threading capabilities and SIMD vector capabilities of modern GPUs. Being a higher level model than Cuda or OpenCL, the PGI Accelerator model offers several potential advantages such as portability (the model isn’t hardware specific), incremental changes and optimisations are possible, and the directives are ignored by other compilers. One question PGI often gets is ‘can


directives achieve the same level of speed- up as Cuda?’ The short answer is yes, but doing so often involves some algorithm or data structure changes, code restructuring or taking advantage of unique GPU hardware characteristics such as shared memory and asynchronous streams. In fairness, though, many of these same changes are required to extract optimum performance using Cuda. Also working on directives are two


other companies that sell GPU compilers: CAPS (with its HMPP compiler) and PathScale (with its ENZO compiler). They likewise recognise the difficulty of programming in Cuda, so together they worked out some directives that offer a high level abstraction for hybrid programming. Going a step further, they have taken this programming model and are proposing it as a standard, OpenHMPP, where the primary goal is to give end users a strong say in how the standard develops. The first OpenHMPP Users Meeting is being held at Supercomputing 2011 in Seattle in late November.


Access GPUs almost invisibly MathWorks, developer of Matlab, provides several ways for programmers to take advantage of GPU capabilities, and these are all made available through the Parallel Computing Toolbox. At the fi rst level, the


www.scientific-computing.com


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48  |  Page 49  |  Page 50  |  Page 51  |  Page 52