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

Compare with Current View Page History

Version 1 Next »

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 $

Unknown macro: {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

  • No labels