OpenMP and MPI learning materials

Are there any good OpenMP and MPI learning materials for Fortran users? Preferably in PDF format.

I have found the book “Using OpenMP” by Chapman, Jost & Van Der Pas (2008) to be a very useful reference, although the version I have is only to about OpenMP Ver 3+.

I would be interested to know of other more recent references.

Although openmp.org still exists, their forum is no longer there and may have been transferred to stackoverflow.com. It was a useful information source, but I can’t find their posts on stackoverflow.

1 Like

There is

Mattson, Timothy G., Yun (Helen) He, and Alice E. Koniges (2019). The OpenMP Common Core: Making OpenMP Simple Again. MIT Press

The book uses C but the authors write

For Fortran programmers, we’ve created a companion document, Fortran Supplement (ver. 1.2.1), which presents all the code from the Common Core book in Fortran instead of C. We hope this will let Fortran programmers extract maximum value from the book.

The book is in my Fortran-related books list.

There are several hits when searching “openmp” at the Fortran Wiki tutorials page.

3 Likes

One thing that puzzles me is that most Fortran books don’t have chapters for OpenMP or MPI. I understand that they are not part of the standard, but they seem to be used much more than coarray based on the count of stack overflow questions.

I would estimate the reason for few books is that most Fortran authors, being proficient in the Fortran Standard, are not users of OpenMP.
While I have become proficient in PARALLEL DO, I have little experience in WORKSHARE, so it may be a challenge to be able to cover the scope of OpenMP Ver 5.2 !

The scope of OpenMP is ever expanding and I have spent some time trying to understand just the memory management requirements. However having a compiler that supports the new features is a problem.
The memory management features of Ver 5.1 are much more diverse than my requirements, so even these features would be a challenge to document and demonstrate.
My solutions/understanding have been limited to the relationship between heap and stack for private vs shared array types, which in itself is significant for OpenMP performance.
It is performance which is a key outcome/measure of OpenMP usage.

Introduction to Programming with Fortran (2018), 4th ed. by Chivers and Sleightholme has the following chapters and page numbers

31 Introduction to Parallel Programming . . . . . . . . . . . . . . . . . . . . . . 567-580
32 MPI - Message Passing Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 581-604
33 OpenMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605-620
34 Coarray Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621-632

2 Likes

exactly what I have been looking for. the springer link website indicates that this book has been downloaded 4.9 million times. this is surprising because i only saw people talking about the Modern Fortran Explained book.

must be a fake. With EUR 72 price for ebook format, this would mean 350 million Euro for just one book. According to Statista page Springer yearly revenue oscillates around 580 million Euro.
Well, unless they count the (free) downloads of Front Matter (Contents) and Back Matter (Appendices, Index)

Most universities in the U.S. have subscribed to Springer Link. Most Springer Link ebooks, including this Fortran book, are free to subscribers. That being said, 4.9 million downloads still sounds unreal.

Thx for the hint. I checked my non-US university and it also has it. I was able to download the book and it looks interesting, indeed.

There is also a chapter on parallel programming in Modern Fortran in Practice by Arjen Markus, covering OpenMP, MPI and Coarrays, with some sample code.

I am surprised that 15 pages on OpenMP is a solution to the OP !
The book I quoted is over 300 pages, still with limited discussion on significant features I don’t use, such as WORKSHARE and SECTIONS.
It is amaizing the breadth of OpenMP application.

The figure is for chapter downloads. In the university library sector Springer has deals that cover journals and books.

1 Like

I found this collection:
https://web.corral.tacc.utexas.edu/CompEdu/pdf/pcse/

I have found a very extensive document (436 pp.) OpenMP Application Programming Interface. Examples on openmp.org, with dozens of examples written both in C and Fortran. It is quite new (June 2020), covers version 5.0.1.

2 Likes

I noticed that you are the author of Introduction to Programming with Fortran. I have skimmed it and found it very useful. With all due respect, I feel like the first three chapters could be made a little bit more focused. For example, move chapter 1 to a preface + conventions section, move chapter 3 to the appendix, and use chapter 2 as chapter 1. Just some personal opinions.

Hi thanks for getting in touch. Springer currently have a minimum 20% content change requirement between editions. It is unlikely given this requirement that there will be a 5th edition, and that the 4th edition will be our last Fortran text book.

Some time ago I bought this book (though I haven’t read it in detail yet…) The contents seem to cover MPI, OpenMP, OpenACC/GPU, etc… :slight_smile:

1 Like