I was having some issues while working with Sniper Multicore Simulator 7.2 with Pin tools 3.11. So I followed the logs and found some ways to clean things up and make it workable. Keeping it here so that in future I might use the same application without any hassles.
- Download the necessary files
-
Sniper simulator 7.2
$ wget http://snipersim.org/download/b83613395338cc0e/packages/sniper-latest.tgz
-
pin tools
$ wget https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz
-
Sniper simulator 7.2
-
Then install required Dependencies
$ 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
-
Now extract sniper file into a directory. I am assuming you will extract it in
~/sniper-7.2
directory.
$ tar xvzf sniper-latest.tgz
-
Now extract the pintool into another directory. I am assuming you will extract it in
~/pin-3.11-97998-g7ecce2dac-gcc-linux/
directory.
$ tar xvzf pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz
-
Make a folder inside the
$ mkdir -p ~/sniper-7.2/pin_kit
- Copy the pin tool extracted files to
~/sniper-7.2/pin_kit/
directory
$ mv ~/pin-3.11-97998-g7ecce2dac-gcc-linux/* ~/sniper-7.2/pin_kit/
-
add
PIN_HOME
variable to system path by editing~/.bashrc
export PIN_HOME="~/sniper-7.2/pin_kit"
-
Modify the
~/sniper-7.2/tools/pinversion.py
file atLine 12
for filebase in ( 'source/include/pin/pin_version.h', ):
Remember the comma after the path is important. This is to treat the range as a tuple, if we do not put the comma, then the range would be compared as a array of string instead. -
Edit the files to put proper namespace before
string, cerr and endl
You can just addusing namespace std;
on the files that cause error.
Or you can addstd::
before each instance ofstring, cerr and endl
These are the files where you need to addusing namespace std;
after the#include
part
- sift/standalone_pin3.0/globals.cc
- sift/recorder/globals.cc
- frontend/pin-frontend/globals.cc
- sift/standalone_pin3.0/globals.h
- sift/recorder/globals.h
- frontend/pin-frontend/globals.h
- sift/standalone_pin3.0/papi.cc
- sift/recorder/papi.cc
- sift/recorder/recorder_control.cc
-
Now make sure you are the
~/sniper-7.2
directory by doing
$ cd ~/sniper-7.2
-
compile the sniper simulator
$ make -j12
Here I have used -j12 because of 12 cores in my computer. -
To test your build, go to one of the test directory
$ cd ~/sniper-7.2/test/fft
-
run the file
$ make run