Generating synchronization statements in divide-and-conquer programs

  • Authors:
  • Pieter Hijma;Rob V. van Nieuwpoort;Ceriel J. H. Jacobs;Henri E. Bal

  • Affiliations:
  • Department of Computer Science, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands;Department of Computer Science, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands;Department of Computer Science, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands;Department of Computer Science, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands

  • Venue:
  • Parallel Computing
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Divide-and-conquer is a well-known and important programming model that supports efficient execution of parallel applications on multi-cores, clusters, and grids. In divide-and-conquer systems such as Satin or Cilk, recursive calls are automatically transformed into jobs that execute asynchronously. Since the calls are non-blocking, consecutive calls are the source of parallelism. However, programmers have to manually enforce synchronization with sync statements that indicate where the system has to wait for the result of the asynchronous jobs. In this article, we investigate the feasibility of automatically inserting sync statements to relieve programmers of the burden of thinking about synchronization. We investigate whether correctness can be guaranteed and to what extent the amount of parallelism is reduced. We discuss the code analysis algorithms that are needed in detail. To evaluate our approach, we have extended the Satin divide-and-conquer system, which targets efficient execution on grids, with a sync generator. Our experiments show that, with our analysis, we can automatically generate synchronization statements in virtually all real-life cases: in 31 out of 35 real-world applications the sync statements are placed optimally. The automatic placement is correct in all cases, and in one case the sync generator corrected synchronization errors in an application (FFT).