(j3.2006) Fortran programming model for GPU programming
Rasmussen, Craig E
Thu Jan 27 10:34:16 EST 2011
I've been helping to develop the ROSE compiler so that we can use it to transform Fortran to OpenCL kernels for acceleration on GPUs. I have also created Fortran interfaces to the the OpenCL runtime so that Fortran programmers can run OpenCL kernels from their programs. We have submitted a paper to the HIPS workshop showing acceleration of a shallow water code by up to 40 X on a GPU using our compiler.
So why does this matter to J3? In my opinion Fortran is an ideal language for programming massively threaded architectures like GPUs, primarily because Fortran has native support for arrays. In addition, it has constructs like DO CONCURRENT as well as pure and elemental procedures. However, I think there are a few things that could be tweaked to make the language more applicable to accelerated architectures.
If there is interest, I could give a tutorial at the next J3 meeting on what it looks like to program GPUs and how Fortran constructs map to them. I think it would also be interesting to hear from Bill regarding what Cray is doing with OpenMP on GPUs.
More information about the J3