Fortran applications using Fortran 2008+ features

First, most people use “coarrays” as a shorthand for “parallel features in Fortran.” I’m interpreting the original post in this light and want to point out that Fortran’s parallelism now has a large set of parallel features that do not require coarrays and I find that the non-coarray features cover all the parallel algorithmic needs of a surprisingly large percentage of applications – possibly even the majority of applications that I encounter in projects. These features include

  • Image enumeration (this_image(), num_images())
  • Synchronization: sync all, sync images
  • Error termination: error stop (including error stop in pure procedures with variable stop codes)
  • Collective subroutines: co_sum, co_max, co_min, co_broadcast, co_reduce
  • Teams: form team, end team, change teams, sync team, team_type
  • Failed images: failed_images(), fail image, STAT_FAILED_IMAGE

In fact, the features that require coarrays are now a small minority of the parallel features:

  • Coarrays
  • Events: event_type, event_query(), event post, event wait
  • Atomic subroutines
7 Likes