Getting Started

Carbon Research Group edited this page Mar 18, 2014 · 44 revisions

This page explains how to obtain and build graphite along with running an application.

System requirements

Graphite currently works on both Debian 6 “Squeeze” and Ubuntu 12.04. We recommend Ubuntu for new users and may stop supporting Debian at some point in the future. If you run a different operating system and would like to try out Graphite, we have had good luck running Graphite on Debian and Ubuntu in a virtual machine (with some performance penalty). VMWare Player is available for free for a variety of platforms and has an easy, streamlined process for installing these OSes. We only support 64-bit host and target architectures.

Installing the dependencies:

Download Pin from the pintool website Pin Downloads. Graphite currently works with version “62141”. (Note: The Pin maintainers are no longer keeping all the old versions available on the pintool website so you may not be able to find this specific version. If this happens, try other close versions and please let us know on the graphite-sim Google group mailing list.) Untar Pin into a convenient directory.

Install the libraries needed for compiling (g++, make, libtool, etc…) and other required libraries:

$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install libtool automake autoconf autotools-dev

Graphite requires Boost version 1.48 on Ubuntu. For Squeeze, we recommend version 1.42 (substitute 42 for 48 in the command below).

$ sudo apt-get install libboost1.48-dev libboost-filesystem1.48-dev libboost-system1.48-dev

Graphite requires BerkeleyDB to cache the power models obtained from CACTI and DSENT in a local disk database. This is to avoid recomputation for the same cache & network configuration across simulations.

$ sudo apt-get install libdb-dev

If you are developing on Graphite, then you will probably want to use version control. Graphite uses git:

$ sudo apt-get install git-core

Obtaining the source code:

The Graphite source code is released under the standard MIT license. Please see the LICENSE file in the top level of the source tree for details.

There are two ways to obtain Graphite’s source code. If you intend only to use Graphite, then the Tarball method is simplest. If you intend to collaborate in the development of Graphite, then you should use the Git method. The documentation DirectoryStructure may be useful for understanding the layout of the files and directories in Graphite.

Tarball method

Grab a tarball of the master branch from git hub, extract it and enter the directory.

$ wget -O graphite.tar.gz
$ tar -zxvf graphite.tar.gz
$ cd mit-carbon-Graphite-*

Git method

Graphite uses git for source control. If you are unfamiliar with git, this site (github) provides a good introduction. The first step is to install git. Next, clone the repository:

$ git clone git:// [source directory]
$ cd [source directory]

And you are ready to go!

Building the simulator:

Now that we have all of the dependencies and the source code we are almost ready to build Graphite. First, however we must configure a few details in the build system to configure paths of installed dependencies.

Make the following change to the file “Makefile.config”:
Set PIN_HOME to point to the directory where you untarred Pin.

Now simply run “make” in the graphite directory to build the simulator.

$ make

To test your build, run the following command and watch for errors (warnings are OK):

$ make ping_pong_app_test

You’re now ready to move on to Adding and Running Applications.