Difference between revisions of "Getting Started"

From Sniper
Jump to navigation Jump to search
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* Download the Sniper source code from ...
+
* Get the Sniper source code from our [[Download]] page
** <code>git clone ...</code>
 
  
* Download the latest Pin kit from the [http://www.pintool.org/downloads.html Pin downloads] page
+
* Download a [https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool Pin] or [https://software.intel.com/en-us/articles/program-recordreplay-toolkit Pinplay] kit from their respective sites.
** Extract Pin into sniper/pin_kit
+
** The master branch of Sniper works with modern Pin versions (Pin 3.0+), while the pin2 branch works with older versions (Pin 2.14-71313). We recommend using a modern Pin 3 version if possible.
** Or set PIN_HOME to the location of Pin if you use a different directory or shared Pin location
+
** Sniper 7.2 has been tested with versions of Pin up to Pin-3.7 and Pinplay-3.5.
 +
** Extract Pin and symlink or rename to the pin_kit directory in Sniper's subdirectory: <code>sniper/pin_kit</code>
 +
** Set PIN_HOME to the location of Pin if you use a different directory or shared Pin location
 +
 
 +
* Install Option 1 - Docker Install
 +
** <code>cd sniper/docker</code>
 +
** <code>make # build the Docker image</code>
 +
** <code>make run # starts running the Docker image</code>
 +
** <code>cd .. # return to the base Sniper directory (while running inside of Docker)</code>
 +
 
 +
* Install Option 2 - Native install
 +
** <code>sudo dpkg --add-architecture i386</code>
 +
** <code>sudo apt-get install binutils build-essential curl git libboost-dev libbz2-dev libc6:i386 libncurses5:i386 libsqlite3-dev libstdc++6:i386 python wget zlib1g-dev</code>
  
 
* Compile Sniper. Some extra dependencies (a pre-compiled copy of the Python interpreter environment) will be downloaded automatically, so make sure you have a working internet connection when you make Sniper for the first time
 
* Compile Sniper. Some extra dependencies (a pre-compiled copy of the Python interpreter environment) will be downloaded automatically, so make sure you have a working internet connection when you make Sniper for the first time
** <code>make</code>
+
** <code>make # or use 'make -j N' where N is the number of cores in your machine to use parallel make</code>
  
 
* Running an application
 
* Running an application
** <code>./run-sniper -- echo hello</code>
 
 
** <code>cd test/fft; make run</code>
 
** <code>cd test/fft; make run</code>
  
Line 19: Line 29:
 
* [[Porting applications to Sniper]]
 
* [[Porting applications to Sniper]]
  
* [[Accessing simulator hooks from inside an application]]
+
* [[Download Benchmarks|Obtaining more benchmarks]]
 +
 
 +
* [[Multi-programmed workloads|Run multi-programmed workloads]]
 +
 
 +
* [[Simulator hooks|Accessing simulator hooks from inside an application]]
 +
 
 +
* [[Scripting|Write scripts to monitor and control simulations]]
  
 
=== Prerequisites ===
 
=== Prerequisites ===
  
* GCC 4.3
+
* Modern Ubuntu version (16.04, 18.04, etc.)
* A recent Pin version (for example, [http://www.pintool.org/downloads.html 2.10-43611] or newer)
+
* A recent Pin version (for example, [https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool Pin 3.5] or newer recommended)
* Boost 1.38+
 

Latest revision as of 04:15, 17 February 2019

  • Get the Sniper source code from our Download page
  • Download a Pin or Pinplay kit from their respective sites.
    • The master branch of Sniper works with modern Pin versions (Pin 3.0+), while the pin2 branch works with older versions (Pin 2.14-71313). We recommend using a modern Pin 3 version if possible.
    • Sniper 7.2 has been tested with versions of Pin up to Pin-3.7 and Pinplay-3.5.
    • Extract Pin and symlink or rename to the pin_kit directory in Sniper's subdirectory: sniper/pin_kit
    • Set PIN_HOME to the location of Pin if you use a different directory or shared Pin location
  • Install Option 1 - Docker Install
    • cd sniper/docker
    • make # build the Docker image
    • make run # starts running the Docker image
    • cd .. # return to the base Sniper directory (while running inside of Docker)
  • Install Option 2 - Native install
    • sudo dpkg --add-architecture i386
    • sudo apt-get install binutils build-essential curl git libboost-dev libbz2-dev libc6:i386 libncurses5:i386 libsqlite3-dev libstdc++6:i386 python wget zlib1g-dev
  • Compile Sniper. Some extra dependencies (a pre-compiled copy of the Python interpreter environment) will be downloaded automatically, so make sure you have a working internet connection when you make Sniper for the first time
    • make # or use 'make -j N' where N is the number of cores in your machine to use parallel make
  • Running an application
    • cd test/fft; make run

Next steps

Prerequisites

  • Modern Ubuntu version (16.04, 18.04, etc.)
  • A recent Pin version (for example, Pin 3.5 or newer recommended)