You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Habanero-C is a project designed to add the Habanero parallelism constructs to the C language.

Habanero-C has two basic primitives for the task parallel programming model borrowed from X10: async and finish. The async statement, async <stmt>, causes the parent task to fork a new child task that executes <stmt>. Execution of the async statement returns immediately, i.e., the parent task can proceed to its following statement without waiting for the child task to complete.

The finish statement, finish <stmt>, performs a join operation that causes the parent task to execute <stmt> and then wait until all the tasks created within <stmt> have terminated (including transitively spawned tasks).

Habanero-C uses phasers for synchronization. Phasers are programming constructs that unify collective and point-to-point synchronization in task parallel programming. Phasers are designed for ease of use and safety, helping programmer productivity in task parallel programming and debugging. The use of phasers guarantees two safety properties: deadlock-freedom and phase-ordering. These properties, along with the generality of its use for dynamic parallelism, distinguish phasers from other synchronization constructs such as barriers, counting semaphores and X10 clocks.

For locality, Habanero-C uses Hierarchical Place Trees (HPTs). HPTs abstract the underlying hardware using hierarchical trees, allowing the program to spawn tasks at places, which for example could be cores, groups of cores sharing cache, nodes, groups of nodes, or other devices such as GPUs or FPGAs. The work-stealing runtime takes advantage of the hardware hierarchy to preserve locality when executing tasks.

The Habanero-C runtime is written completely in ANSI C, with a couple of library routines for low-level synchronization and atomic operations written in assembly language.

The Habanero-C compiler is written in C++ and is built on top of the ROSE optimizing compiler infrastructure.

Habanero-C has been ported and tested on Intel X86, Cyclops 64 and Intel SCC multicore platforms.

Habanero-C implementation is very much in a preliminary phase and constantly evolving. If you would like to try it, please contact one of the project leads (Vivek Sarkar, Zoran Budimlic, Yonghong Yan or Vincent Cave) to gain access to the svn repository.

  • No labels