Function shipping and synchronization constructs in CAF 2.0, Chaoran Yang

Over the past decade, the message passing programming model, which is typically used for programming on large scale supercomputers has gradually shown its inadequacy in expressiveness and scalability, as the number of cores of today's supercomputers grow increasingly large. As a alternative, Partitioned global address space (PGAS) languages are viewed as a promising model in dealing with next generation large scale parallel programming. We, at Rice, are developing a set of PGAS extensions to Fortran languages which we call Coarray Fortran 2.0 (CAF 2.0). Our design exceeds greatly the original Coarray Fortran (CAF) proposed by Numrich and Reid in 1998, by enhancing the language with teams, asynchronous communication, function shipping, collective communication, implicit & explicit synchronization constructs.

In this paper, we describe two synchronization constructs used in CAF 2.0: Cofence and Finish. The cofence construct provides the ability to ensure global or local completion of put, get, and implicitly synchronized asynchronous operations. Finish is inspired by async-finish constructs in X10, but is brought into a SPMD world. Finish in CAF 2.0 ensures global completion of asynchronous operations in a team.

We explore the interactions between these two constructs with asynchronous copy operations, asynchronous collectives and in the context of function shipping, and demonstrate that these synchronization primitives are necessary to give user fully control over program's synchronization, and also makes it easier reducing synchronization cost where possible.