Modern Fortran: Building Efficient Parallel Applications

I wrote a book about parallel Fortran programming. It guides the reader through the development of a parallel tsunami simulator while promoting a modern Fortran style and syntax. We tackle a few other real-world applications such as stock price prediction, weather data analysis, and a small TCP client-server. If you’re just getting started with Fortran programming, or you’re interested in making your Fortran more clear, expressive, and functional, this is a book for you.

The book is complete and is in production. Hard copies are expected to ship in November 2020, however, you can buy it now through Manning’s Early Access Program (MEAP). To get a taste for the book before buying a copy, download chapters 2, 3, and 4 for free here. Chapter 5 has also been published for free as a 3-part article series. The complete source code from this book is available on the book’s Github page.

Table of Contents

Part I: Getting Started with Modern Fortran

1 Introducing Fortran ✅

2 Getting Started: Minimal Working App

Part II: Core elements of Fortran

3 Writing Reusable Code with Functions and Subroutines

4 Organizing your Fortran code using Modules

5 Analyzing Time Series Data with Arrays

6 Reading, Writing, and Formatting your data ✅

Part III: Advanced Fortran Use

7 Going Parallel with Fortran Coarrays ✅

8 Working with Abstract Data using Derived Types ✅

9 Generic Procedures and Operators for any Data Type ✅

10 Overloading Operators for Derived Types ✅

Part IV: The Final Stretch

11 Interoperability with C: Exposing your App to the Web ✅

12 Advanced Parallelism with Teams, Events, and Collectives ✅


A: Setting up the Fortran Development Environment ✅

B: From Calculus to Code ✅

C: Concluding Remarks ✅


If I had this book when writing my master thesis in astrophysics I would have spared a lot of time in learning how to write the code for my calculations. ~Davide Cadamuro

Shows very modern content with good balance between application and theory. ~Marcio Nicolau

Well written and gives a great introduction to Fortran and to numerical computing. ~Mikkel Arentoft

Compared to other programming books I have seen, this one is exceptionally pleasant to work through. ~Konrad Hinsen

Gives a great overview of the capabilities of modern Fortran in the context of High-Performance Computing. ~Patrick Seewald