1 Introducing Fortran

 

This chapter covers

  • What is Fortran and why learn it?
  • Fortran’s strengths and weaknesses
  • Thinking in parallel
  • Building a parallel simulation app from scratch

This is a book about Fortran, one of the first high-level programming languages in history. It will teach you the language by guiding you step-by-step through the development of a fully featured, parallel physics simulation app. Notice the emphasis on parallel. Parallel programming allows you to break your problem down into pieces and let multiple processors each work on only part of the problem, thus reaching the solution in less time. By the end, you’ll be able to recognize problems that can be parallelized, and use modern Fortran techniques to solve them.

This book is not a comprehensive reference manual for every Fortran feature--I’ve omitted significant parts of the language on purpose. Instead, I focus on the most practical features that you’d use to build a real-world Fortran application. As we work on our app chapter by chapter, we’ll apply modern Fortran features and software design techniques to make our app robust, portable, and easy to use and extend. This isn’t just a book about Fortran; it’s a book about building robust, parallel software using modern Fortran.

1.1 What is Fortran?

I don’t know what the language of the year 2000 will look like, but I know it will be called Fortran.

  --Tony Hoare, winner of the 1980 Turing Award

1.2 Fortran features

1.3 Why learn Fortran?

1.4 Advantages and disadvantages

1.4.1 Side-by-side comparison with Python

1.5 Parallel Fortran, illustrated

1.6 What will you learn in this book?

1.7 Think parallel!

1.7.1 Copying an array from one processor to another

1.8 Running example: A parallel tsunami simulator

1.8.1 Why tsunami simulator?

1.8.2 Shallow water equations

1.8.3 What we want our app to do

1.9 Further reading

Summary

sitemap