Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

CnC-Scala    Image Added

Section
Column
width60%

The

Wiki Markup
The

CnC-Scala

system

under

development

in

the

Habanero

project

at

Rice

University

builds

on

past

work

on

the

Intel

Concurrent

Collections

(CnC)

and

Habanero

CnC

projects. Installation instructions: The current release of CnC-Scala has been tested with Scala version 2.9.1. You will need to have the scalac and scala commands available in your path. Download the CnC-Scala distribution and unzip the contents. You should have the following file: cnc-scala |- readme.txt |- bin |- cnc_scala_compile |- cnc_scala_run |- cnc_scala_translate |- lib: |- cnc-runtime-0.1.jar |- jsr166y-1.7.0.jar |- examples: |- Cholesky/* |- FindPrimes/* |- LUDecomposition/* |- NQueens/* |- PartitionString/* Set the CNC_SCALA_HOME environment variable to point to the cnc-scala directory. Add ${CNC_SCALA_HOME}/bin to your path. The installation is now complete and you are now ready to run the examples and write your own CnC programs. Running examples: Some examples are provided in the standard distribution. Each example is followed by a Makefile which provides the commands to translate(generate stub code) the CnC graph, compile the generated and user code, and finally run the program. Running make all should run each of these steps in the examples. Once successfully installed, please refer to the examples on how to write CnC-Scala programs. The two simplest examples to get started are: Partition String: finds the odd length repeating fragments from the input string Find Primes: finds all odd numbers which are primes up to the given input These are steps required to write a CnC-Scala program from scratch: 1. Provide a definition of the CnC computation graph 2. Generate the stub code for the CnC Graph, Steps and Tag Collections using cnc_scala_translate command 3. Provide implementations for the Steps 4. Write a main method to initialize the CnC graph and start the computation 5. Compile the generated and custom code using cnc_scala_compile command 6. Run the compiled program using cnc_scala_run command

projects.  

A short introduction to the Concurrent Collections model can be found in the following article:

  • The Concurrent Collections Programming Model.  Michael G. Burke, Kathleen Knobe, Ryan Newton, Vivek Sarkar.  Technical Report TR 10-12, Department of Computer Science, Rice University, December 2010.  To appear as a book chapter in Encyclopedia of Parallel Computing, David Padua (Ed.), Springer Verlag, 2011.

CnC-Scala supports two execution modes:

  1. Continuation based: if an item is not available, the Step is suspended and the continuation resumed when the item becomes available. This mode uses the Scala continuation plugin's support for delimited continuations. This allows the user to write only the step execution code and avoid defining extra methods that explicitly declare data dependences.
  2. Data-Driven Future based: User step explicitly declares it data dependences in advance before the Step.compute() is called. As such the items are always available and there is no need for continuations. However, this limits the Step dependences to be data independent.

As of release 0.1.2 these execution modes have been combined into a single runtime and can be used together in computation steps.

To get started with CnC-Scala, see the Installation instructions. Once successfully installed, please refer to the examples page on how to write CnC-Scala programs. Here are some slides presenting CnC-Scala. A YouTube video demonstrating how to write CnC-Scala programs is also available. CnC-Scala was also presented at Scala Days 2012 [slides].

For questions or comments please contact Shams Imam (shams[AT]rice[DOT]edu)

Column
width35%
Page Tree Search

Habanero Home

Research Projects

Publications

Target Applications

Multicore Platforms

People

Related Links