[J3] Performance Portability and Fortran: Making Fortran cool again
Ondřej Čertík
ondrej at certik.us
Wed Jan 16 00:54:38 EST 2019
Hi Gary,
On Tue, Jan 15, 2019, at 6:32 PM, Gary Klimowicz via J3 wrote:
> Hi, J3.
>
> I need your help.
>
> At the last minute (well, last week), I was asked to sit on a panel on> performance portability at the Exascale Computing Project annual
> meeting. Thursday. Morning.
>
> There will be panelists representing C++, OpenMP and OpenACC and
> frameworks like Kokkos and Raja.
>
> I've been asked to have one slide and some words about Fortran
> 2018 and> performance portability. The guidelines are along the following:
>
>
> Usage
>
> · What ECP projects are using these technologies? Why?
> Why not?>
> · What's the breadth of usage outside of a particular Lab?
>
> · What conditions are changing that might affect adoption?
>
> Features
>
> · What key values get people to try them?
>
> · What could be done to make them more appealing?
>
> · What trends are needed/happening with these topics (e.g.,
> graphs/tasks in Kokkos, parity on CPUs for OpenACC)
>
> · (To panelists) Has your offering been compared
> quantitatively> to other alternatives?
>
> Portability
>
> · What factors about this programming model most affect
> portability?>
> · What are the portability opportunities and challenges of
> this> programming model?
>
> · How effectively has portability been assessed for this
> programming model, relative to others?
>
> Now, that's a lot to cover.
>
> I'm thinking that there are a few important things Fortran has
> that the> others don't:
>
> * Decades of code bases that continue to work and whose
> performance> improves as compiler and hardware technology improves
> * A DSL (domain-specific language) for array operations
> * Coarrays and teams
> * DO CONCURRENT
> * Strong rules about data aliasing (supporting optimizations like> vectorization)
>
> I'm sure I'm missing some obvious things.
>
> If you had 10 minutes to explain to this group why Fortran is
> cool again> for portable performance, what would you say?
>
> Any help you can provide will be paid back at FIDS.
Probably not what you want to hear, but many people at my Lab are moving
away from Fortran to C++/Kokkos, because Fortran currently doesn't have
a clear path forward I am afraid. That's one reason I decided to be
active here.
Kokkos allows to have the same code/loop run in parallel on a CPU and a
GPU, and to switch array memory layout accordingly.
The closest that Fortran has is OpenACC/OpenMP which allows to have the
same loop to run on both CPU and GPU, but it doesn't seem to have a
mechamism to switch the memory layout like Kokkos does.
Another problem is that only a few Fortran compilers support OpenACC
currently, while Kokkos runs on most major C++ compilers.
So I would say that currently there is no equivalent of Kokkos in
Fortran, so we can't do performance portability in the Kokkos's sense.
However, if you give up on having the same code base run on both CPU and
GPU, then Fortran has Cuda Fortran, which I think very naturally extends
Fortran with a few keywords and constructs to run on a GPU. I think the
resulting code is simpler than Cuda C, and I would argue simpler than
Kokkos. But it only runs on a GPU, which some people don't like, but I
also know people who think that's the solution, to structure their code
so that only a minor part has to be targeted to a GPU specifically using
Cuda Fortran.
So you can mention Cuda Fortran in your slide.
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20190115/c57b1212/attachment-0001.html>
More information about the J3
mailing list