Fortran projects running on GPUs in production

Are there any projects using Fortran with GPU in production?

There must be a way.

At least for Intel, as their OneAPI name suggested and their firm willingness into GPU business. By the way, I am pretty sure they never give up GPU, and as GPU computation catches more and more attentions considering its potential in doing big matrix operations such as solving some partial differential equations, fluid dynamics, heat transfer, imaging processing (convolution matrix), cellular automata, etc. Those stuff previously are suitable for Xeon Phi (slower but have many threads and high bandwidth memory), now Xeon Phi is basically replaced by GPUs.

In short, I see no reason why Intel Fortran cannot offload openMP or something from Intel CPU to Intel GPU, they have some links as below,

I have a similar thread, but I am not very sure how to really offload to Intel GPU, I think I am almost there but still need one more step to make it work. In fact the examples are all in OneAPI’s example folder, if their instruction on how to offload openMP to GPU a little clear (especially on Windows) it will be great,

I think gfortran or Lfortran can also offload openMP to GPU, if not now, in the near future it should be possible.

But I guess, if the application needs to frequently exchange data from CPU through memory to GPU, then the speedup by GPU will be ruined by the slow memory speed (bandwidth). For example, a typical DDR4 2666 memory’s bandwidth is just about 30 GB/s. GPU’s GDDR5 or something could be 10x faster.

In fact, I suspect the reason that apple’s M1 chip can achieve very high performance, one importance reason is that the memory on M1 chip Mac has quite high bandwidth, like 200 - 400 GB/s if I remember correctly. That is almost the same speed as L2 or L3 cache (but cache should have at least 10x shorter latency than memory). That also explains why M1 Mac is very good image/video processing, as those applications typically will be benefit from high speed memory (images are just some big arrays in the memory).

Amber Molecular Dynamics is one of the most popular Molecular Dynamics packages whose kernel is modern Fortran with GPU support.

1 Like

Quantum ESPRESSO toward the exascale

Abstract: Quantum ESPRESSO is an open-source distribution of computer codes for quantum-mechanical materials modeling, based on density-functional theory, pseudopotentials, and plane waves, and renowned for its performance on a wide range of hardware architectures, from laptops to massively parallel computers, as well as for the breadth of its applications. In this paper, we present a motivation and brief review of the ongoing effort to port Quantum ESPRESSO onto heterogeneous architectures based on hardware accelerators, which will overcome the energy constraints that are currently hindering the way toward exascale computing.

Section III C describes the current status, capabilities, and some benchmarks for Quantum ESPRESSO on NVIDIA graphics processing units (GPUs), one of the leading candidate architectures for the future “exascale computer.” The benchmarks are designed for relatively small machines and do not aim at showing performances on large-sized systems. They aim instead at pointing out bottlenecks, inefficiencies, and the minimum size of calculations that saturate the computational power of a GPU.

Taken from the (reference: J. Chem. Phys. 152 , 154105 (2020).

Mostly, I would say 99% of the codebase is Fortran90 or Fortran200x. For more details, see the main website: https://www.quantum-espresso.org/

2 Likes

IBM’s GRAF is a proprietary fork of MPAS that runs on GPUs. I heard that it uses OpenACC directives but I don’t know this for a fact.

1 Like

Peter Ukkonen runs a fork of neural-fortran on GPUs using OpenACC directives and delegating matmul calls to cuBLAS (Paper).

This is academic research, so probably not what you’d call true production, but these projects often have the end-goal of being used in production a few years down the road.

1 Like

Here is a list of HPC codes that all run on GPU: https://www.nvidia.com/content/intersect-360-HPC-application-support.pdf, most of the top 10 codes are in Fortran.

2 Likes

I don’t think this qualifies as a Fortran project, but PETSc which you can call from Fortran is adding/has added GPU support

2 Likes

Not a direct pointer, but many of the applications that use OpenACC for GPU acceleration are in Fortran as well. When I was last an NVIDIA, there were over 100 GPU-accelerated production apps with OpenACC. Most of those were primarily in Fortran, but I can’t lay my hands on a definitive list at the moment.

4 Likes

I am also interested in OpenACC, which I got to know from a recent tutorial seminar and seems relatively simple to use. VASP (an electronic structure program) also seems to support GPU via OpenACC.

2 Likes

I think both the Abaqus and LS-DYNA FEM codes have some level
of GPU support and both are (mostly) Fortran.

2 Likes

I think the link I posted above might be exactly the list that you have in mind.

Yours was from November 2017. :slight_smile:

I was thinking of an OpenACC list that was more recent. I thought they had a definitive OpenACC list on the openacc.org web site, but didn’t see it.

1 Like

If you find a more recent list, please share it! It’s hard to find these documents, but they are very helpful to see the status of Fortran. I did a big search around 2017, that document was the best I was able to find.