Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011....
Transcript of Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011....
![Page 1: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/1.jpg)
Graphite – Getting Started
Getting up and running with Graphite
![Page 2: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/2.jpg)
Outline
• System Requirements & Dependencies• Getting & Building Graphite• Simulating Your First Application• Adding Your Own Application• Benchmarks
![Page 3: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/3.jpg)
System Requirements
• Operating System– Debian 5 (Lenny)
• Graphite has not been tested on other OSes– Issues usually arise from different syscalls that result
from different compiler toolchains.
• Lightweight Solution:– Try installing the Lenny business card CD image on a
VM.
![Page 4: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/4.jpg)
Dependencies
• Intel PIN version 27887
• Libraries (g++, make, boost)
• Git
$ apt-get update
$ apt-get install build-essential
$ apt-get install libboost1.35-dev libboost-filesystem1.35-dev libboost-system1.35-dev
$ apt-get install git-core
![Page 5: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/5.jpg)
Outline
• System Requirements & Dependencies• Getting & Building Graphite• Simulating Your First Application• Adding Your Own Application• Benchmarks
![Page 6: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/6.jpg)
Getting Graphite
• Tarball method
• Git method
$ git clone git://github.com/mit-carbon/Graphite.git
$ wget http://github.com/mit-carbon/Graphite/tarball/master -O graphite.tar.gz
![Page 7: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/7.jpg)
Building Graphite
• Makefile.config
• Done!
TARGET_ARCH = x86_64 (or IA_32)
BOOST_VERSION = 1_35
PIN_HOME = /path/to/pin
$ make
![Page 8: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/8.jpg)
Outline
• System Requirements & Dependencies• Getting & Building Graphite• Simulating Your First Application• Adding Your Own Application• Benchmarks
![Page 9: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/9.jpg)
Simulating Your First Application
• Toy applications available under /tests/apps/– eg. /tests/apps/hello_world/
• Graphite’s build system makes building apps a breeze:
$ make hello_world_app_test
![Page 10: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/10.jpg)
Simulating Your First Application
• Toy applications available under /tests/apps/– eg. /tests/apps/hello_world/
• Graphite’s build system makes building apps a breeze:
$ make hello_world_app_test
![Page 11: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/11.jpg)
make hello_world_app_test
Hello, world!
![Page 12: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/12.jpg)
Simulation Results
• Results in output_files/sim.out
• Includes results collected for:– Core Models– Cache Models– Memory Models
![Page 13: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/13.jpg)
Wallclock Times (μs)
0 = simulator start timestart = start of main() loopstop = end of main() loopshutdown = simulator end time
![Page 14: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/14.jpg)
Simulated Times
Time in ns the core runs.
![Page 15: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/15.jpg)
![Page 16: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/16.jpg)
![Page 17: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/17.jpg)
Distribution
• Graphite simulations can be distributed.– Shared file system– SSH permissions
• Define process map in carbon_sim.cfg:
[general]
num_processes = 2
[process_map]
process0 = "server1.csail.mit.edu”
process1 = "server2.csail.mit.edu"
![Page 18: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/18.jpg)
Outline
• System Requirements & Dependencies• Getting & Building Graphite• Simulating Your First Application• Adding Your Own Application• Benchmarks
![Page 19: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/19.jpg)
Adding Applications
• Create app in /tests/apps/app_name/– include source code and header files
• Create makefile
• Done!
TARGET = app_name
SOURCES = app_name.cc
include ../../Makefile.tests
$ make app_name_app_test
![Page 20: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/20.jpg)
Running Outside the Build System
• Compile your application with the following flags:
• Set environment variables:
-static -u CarbonStartSim -u CarbonStopSim-L${GRAPHITE_HOME}/lib -L${GRAPHITE_HOME}/os-services-25032-gcc.4.0.0-linux-ia32_intel64/intel64 -L${GRAPHITE_HOME}/contrib/orion-pthread -lcarbon_sim -lorion -los-services -lboost_filesystem-mt -lboost_system-mt -pthread -lstdc++ -lm
$ export GRAPHITE_HOME = path/to/graphite
$ export PIN_HOME = path/to/pin
![Page 21: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/21.jpg)
Running Outside the Build System
• Set process index– Each instance of Graphite needs a process index.– Scripts in /tools/ spawn instances ordered by index.– For single machine:
• Done!
$ export CARBON_PROCESS_INDEX = 0
$ ${PIN_HOME}/intel64/bin/pinbin -mt –t${GRAPHITE_HOME}/lib/pin_sim -c ${GRAPHITE_HOME}/carbon_sim.cfg -- [PATH/TO/YOUR/APPLICATION]
![Page 22: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/22.jpg)
Outline
• System Requirements & Dependencies• Getting & Building Graphite• Simulating Your First Application• Adding Your Own Application• Benchmarks
![Page 23: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/23.jpg)
SPLASH Benchmarks
• SPLASH-2 under /tests/benchmarks/– Integrated into Graphite build system.– Easy!
$ make barnes_bench_test
![Page 24: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/24.jpg)
Parsec Benchmarks
• Parsec 2.1– Download and point $PARSEC_HOME to the parsec home
directory.
• Build Parsec and add the Graphite configuration
$ ./bin/parsecmgmt -a build -p tools
$ ./bin/bldconfadd -n graphite -c gcc -f
![Page 25: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/25.jpg)
Parsec Benchmarks
• Download Graphite configuration file:
• Build with Graphite configuration:
$ wget http://github.com/downloads/mit-carbon/Graphite/graphite.bldconf-O ${PARSEC_HOME}/config/graphite.bldconf
$ ./bin/parsecmgmt -a build -p apps -c graphite
$ ./bin/parsecmgmt -a build -p kernels -c graphite
![Page 26: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/26.jpg)
Parsec Benchmarks
• Specify path in /tests/Makefile.parsec:
• Done!
$ make blackscholes_parsec
PARSEC_HOME = /path/to/parsec/
![Page 27: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/27.jpg)
Parsec Benchmarks
• Parsec applications tested at large core counts:– blackscholes– canneal– fluidanimate– streamcluster– swaptions
• Other Parsecs yet to be debugged.
![Page 28: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/28.jpg)
Regression Suite
• If you develop on Graphite, remember to check that Graphite still works!
$ make regress_quick
![Page 29: Graphite – Getting Startedgroups.csail.mit.edu/carbon/wordpress/wp-content/uploads/... · 2011. 6. 4. · – Debian 5 (Lenny) • Graphite has not been tested on other OSes –](https://reader035.fdocuments.in/reader035/viewer/2022062610/610b4b288f0d5b49174fa037/html5/thumbnails/29.jpg)
Happy Simulating!