Fortran

Guide To Learn

  • Chapter 17 (“Coarrays”) of Modern Fortran Explained: Incorporating Fortran 2018, by Michael Metcalf, John Reid, and Malcolm Cohen, Oxford University Press.
  • Parallel Programming with Co-arrays, by Robert W. Numrich, Chapman and Hall/CRC.

Summary

  • Fortran refers to any parallel process as an image, whether it’s a physical core or an operating system thread.
  • All images execute the same copy of the program in parallel, independent from one another.
  • The built-in functions this_image and num_images allow you to identify different images.
  • Use these functions in if branches to control the flow of the program for each image.
  • Coarrays are the key mechanism for copying data between images.
  • Use the sync all statement to synchronize all images.
  • The higher the ratio of computation versus communication between images, the more efficient your parallel program will be.
Further reading

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top