Skip to main content
Log in

A Comparison of Co-Array Fortran and OpenMP Fortran for SPMD Programming

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Co-Array Fortran, formally called F−−, is a small set of extensions to Fortran 90/95 for Single-Program-Multiple-Data (SPMD) parallel processing. OpenMP Fortran is a set of compiler directives that provide a high level interface to threads in Fortran, with both thread-local and thread-shared memory. OpenMP is primarily designed for loop-level directive-based parallelization, but it can also be used for SPMD programs by spawning multiple threads as soon as the program starts and having each thread then execute the same code independently for the duration of the run. The similarities and differences between these two SPMD programming models are described.

Co-Array Fortran can be implemented using either threads or processes, and is therefore applicable to a wider range of machine types than OpenMP Fortran. It has also been designed from the ground up to support the SPMD programming style. To simplify the implementation of Co-Array Fortran, a formal Subset is introduced that allows the mapping of co-arrays onto standard Fortran arrays of higher rank. An OpenMP Fortran compiler can be extended to support Subset Co-Array Fortran with relatively little effort.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Cray Research Inc. Application Programmer's Library Reference Manual. Cray Research SR-2165, 1996.

  2. D. Dougherty. Sed & Awk. O'Reilly and Assoc., Sebastopol, CA, 1990.

    Google Scholar 

  3. S. Kleiman, D. Shah, and B. Smaalders. Programming with Threads. SunSoft Press, Prentice Hall, Upper Saddle River, NJ, 1996.

    Google Scholar 

  4. C. H. Koelbel, D. B. Loveman, R. S. Schreiber, G. L. Steele Jr., and M. E. Zosel. The High Performance Fortran Handbook. MIT Press, Cambridge, MA, 1994.

    Google Scholar 

  5. The Message Passing Interface Forum. MPI-2: Extensions to the Message Passing Interface, http://www.mpi-forum.org/docs/docs.html, 1997.

  6. R. W. Numrich and J. Reid. Co-array Fortran for parallel programming. Fortran Forum, 17(2):1–31, 1998.

    Google Scholar 

  7. The OpenMP Organization. OpenMP: A Proposed Industry Standard API for Shared Memory Programming, http://www.openmp.org, 1997.

  8. The OpenMP Organization. OpenMP Fortran Application Programming Interface version 1.1, http://www.openmp.org, 1999.

  9. The OpenMP Organization. OpenMP Fortran Application Programming Interface version 2.0, http://www.openmp.org, 2000.

  10. M. Snir, S. W. Otto, S. Huss-Lederman, D. W. Walker, and J. Dongarra. MPI: The Complete Reference. MIT Press, Cambridge, MA, 1996.

    Google Scholar 

  11. A. J. Wallcraft. SPMD OpenMP vs MPI for ocean models. Concurrency: Practice and Experience, 12:1155–1164, 2000.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wallcraft, A.J. A Comparison of Co-Array Fortran and OpenMP Fortran for SPMD Programming. The Journal of Supercomputing 22, 231–250 (2002). https://doi.org/10.1023/A:1015322200593

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1015322200593

Navigation