Affiliate disclosure

Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.

Further Reading: Coarrays

Coarrays are the part of modern Fortran least covered by general programming resources and best covered by Fortran-specific ones, so this list leans on the language's own literature — the original design paper, the definitive reference, and the community and runtime that make coarrays run today. Sources are tagged Tier 1 (works we are confident exist and recommend) and Tier 2 (real and worth seeking; verify the current edition, venue, or URL yourself). Read enough here to make the write → sync all → read discipline and the coindexed halo reflexive, because the same structure underlies the MPI of Chapter 34.

The origin and the standard

  • Robert W. Numrich and John K. Reid, "Co-Array Fortran for Parallel Programming" (ACM Fortran Forum, 1998). The paper that introduced coarrays, from the two designers, written when the feature was a Cray extension. Short, readable, and the source of the minimalist philosophy — add only the bracket — that the language kept. Tier 2 (real paper; verify exact volume/issue).
  • ISO/IEC 1539-1:2018, the Fortran standard. The normative definition of images, coarrays, segments, synchronization, collectives, and teams. You will not read it cover to cover, but the coarray clauses are the final word on segment-ordering rules when a subtlety bites. Tier 1.

The definitive references

  • Metcalf, Reid, and Cohen, Modern Fortran Explained (Oxford University Press). The authoritative treatment of the coarray model — one of its authors is John Reid — including the exact semantics of segments, sync images, lock/unlock, the collectives, and teams. The book to reach for when you need the precise rule. Tier 1.
  • Milan Curcic, Modern Fortran: Building Efficient Parallel Applications (Manning). A hands-on, example-driven path into parallel Fortran with coarrays at its centre; the natural place to go straight from this chapter to build something larger. Tier 1.

The runtime and the community

  • The OpenCoarrays project (opencoarrays.org). The open-source library that gives gfortran its multi-image execution, plus the caf and cafrun wrappers you compile and launch with. The site documents installation (it is the practical prerequisite for running coarrays on gfortran) and the supported feature set — including the honest state of teams. Tier 1.
  • fortran-lang.org — coarray tutorials and the Discourse forum. Current, community-maintained introductions and the best place to ask a coarray question (including "does my compiler support teams yet?"). Tier 1.
  • The GCC/gfortran documentation, the -fcoarray option and coarray notes. The primary source for what your gfortran supports, -fcoarray=single vs -fcoarray=lib, and known limitations. Tier 1.

For the comparison ahead

  • The MPI standard (mpi-forum.org). Worth skimming now for the collectives — MPI_Allreduce, MPI_Bcast — that co_sum and co_broadcast mirror, so that Chapter 34 reads as a second dialect of ideas you already hold. Tier 1.
  • Appendix G, the parallel-programming reference (this book). Tabulates coarrays, OpenMP, and MPI side by side — the same reduction and halo exchange in all three — so you can see coarrays in context. Tier 1.

Suggested order

  1. Read the coarray sections of Metcalf, Reid & Cohen for the precise model, especially segments and synchronization — the one place worth getting exactly right.
  2. Install OpenCoarrays and re-run this chapter's code/ examples with cafrun -n 4, watching how the image-count-dependent outputs change while the solver's field does not.
  3. Work through Curcic's parallel chapters to build a coarray program larger than the checkpoint.
  4. Skim the MPI collectives and Appendix G before Chapter 34, so the transition from co_sum to MPI_Allreduce feels like translation, not new material.