Background

The non-deterministic semantics of concurrent execution of main-stream languages, combined with the difficulties in debugging concurrency-specific bugs like race conditions, render software engineering for concurrent architectures challenging and time consuming. The data-parallel approach towards concurrent programming with its deterministic semantics and simple synchronisation seems to be a good fit to solve these problems. With the availability of commercial frameworks for data-parallel and stream computation like CUDA and Intel’s Ct, data-parallel programming seems to be ready for the main-stream. However, given the number of “interesting” architectures available, using a hardware bound implementation language cannot be the solution.
In this tutorial we present a completely implicit, architecture neutral approach for programming modern multi- and many-core architectures. It is based on a high-level language featuring a data-parallel programming style. SaC (for Single Assignment C) is a functional array language which combines a C-like syntax with a purely functional semantics. This approach enables successful auto-parallelisation on various architectures including SMPs and GPGPUs.
Over the last 15+ years, we have developed the auto-parallelising compiler sac2c. With more than 300,000 lines of code, it implements over 50 high-level program optimisations. The functional basis of SAC enables these optimisations to systematically transform high-level specifications into fine-tuned, target-architecture-specific code. The generated intermediate C-code can be compiled using any C99-compliant compiler. The runtime system of sac2c features, among other aspects, a micro-thread scheduler as well as a tailor-made, multi-threaded memory management for highly efficient concurrent execution.
The compiler is complemented by an extensive standard library written in SaC and an elaborate foreign language interface enabling the seamless utilisation of existing C libraries.