## The Next Livestream

**The ‘F’ Word : Porting a simple Fortran application to GPUs with OpenMP**

March 17, 2023

**Abstract**

Hey Fortran community, it’s been a while since I’ve done one of these, but I’m back!

In this livestream, I will walk through porting a simple stencil code in Fortran to the GPU using OpenMP. We’ll compare runtimes with the original CPU-only code and with those on AMD hardware. In addition, I’ll show how to use rocprof to generate hotspot and trace profiles and perfetto to visualize trace profiles. This will motivate the use of target data regions (also called unstructured data regions) for minimizing data movements between CPU and GPU.

**Additional Reading**

You can try working through this exercise yourself with the codelab we have written at Building a GPU accelerated application with OpenMP in Fortran

You can learn more about portable GPU programming by following our actively growing repository at Scientific Computing (edu)

## Upcoming Videos

- [April 6, 2023] The ‘F’ Word : Porting a simple Fortran application to GPUs with HIPFort
- [April 14, 2023] The ‘F’ Word : A configurable CLI with FLAP and JSON-Fortran
- [April 21, 2023] The ‘F’ Word : Split form methods, two-point fluxes, and recent updates to SELF
- [TBD] The ‘F’ Word : Reading in accelerometer data from an Arduino in Fortran

## Previous Videos

- [April 22, 2022] The ‘F’ Word : A Spectrally Accurate 2-D Compressible Euler Solver
- [March 25, 2022] The ‘F’ Word : Differential Geometry and the Metric Identities
- [March 11, 2022] GPU Programming in Fortran : Stabilizing the non-linear shallow water equation solver
- [February 25, 2022] GPU Programming in Fortran : Building a conservative Nonlinear Shallow Water Equation Solver
- [February 11, 2022] GPU Programming in Fortran : Building a linear Shallow Water Equation Solver
- [January 28, 2022] GPU Programming in Fortran : Ensuring stability for variable coefficient advection equation solver
- [January 14, 2022] GPU Programming in Fortran : Verifying Spectral Accuracy in the Advection-Diffusion Solvers

## About the ‘F’ Word

“The ‘F’ Word” series is meant to document the use of modern fortran for developing an extensible library that can be used to solve conservation laws (PDEs) using spectral and spectral element methods. By documenting the development process, my hope is to curate examples of using OO Fortran as well as Fortran-C interoperability features for portable GPU and multi-GPU application development.

Another goal is to dispel the idea that Fortran is just about punch cards and GOTO statements by providing an example of an active modern Fortran project. I’ve heard too many times that Fortran is archaic, when it’s clear from this community that Fortran is alive and well in a vibrant and growing community.

For those interested in the mathematical theory, I’m putting together notes before each livestream that covers material relevant to the algorithms that are later implemented in Fortran. Here, the idea is to depict the process of transitioning from an idea and a mathematical model into an implementation in OO Fortran.

The current plan is to have livestreams every two weeks and to start putting out polished videos at least once per month. Rather than creating a new topic every time and polluting this Discourse, I figured it’d be best to share updates on this activity in this one topic.

Feel free to post any questions or discussions about this series or any of the material here. I enjoy spending time on this regularly and I hope this community finds this valuable.