New Sniper Release: Pin3 and initial RISC-V support

1,113 views
Skip to first unread message

Trevor E. Carlson

unread,
Sep 6, 2018, 9:13:15 AM9/6/18
to snip...@googlegroups.com
Hello all,

We would like to announce a new version of Sniper that supports Pin 3 by default (and moves Pin 2.14 support to the pin2 branch) [1]. In addition, we have added initial support for RISC-V [2]; download the new version here [3].

Version 7.0 (September 6th, 2018)
* Added Pin 3, GCC 5 support by default, keeping Pin 2 support in the new pin2 branch
* Added initial RISC-V support
* Add a new utility to automatically compile RISC-V requirements and SPEC CPU2006 binaries for RISC-V
* Add a Docker image for Sniper and RISC-V compilation support
* Fixes SIFT recorder address mapping issue caused by physical page mapping access restrictions in Linux kernels 4.0+

Thanks,
The Sniper Team

[1] https://snipersim.org/w/Releases
[2] https://carrv.github.io/2018/papers/CARRV_2018_paper_7.pdf
[3] https://snipersim.org/w/Download

yongkee kwon

unread,
Sep 7, 2018, 8:03:09 PM9/7/18
to Sniper simulator
Hi Trevor,

Has the below links to download v7.0 been not yet updated?  I am asking because I tried to get it through via wget and git but both gave me the same one as v6.1.

Also what pin version would you recommend with v7.0? Can I simply use the latest one of pin 3.7 with pincrt?

Thanks,
Yongkee

Trevor E. Carlson

unread,
Sep 10, 2018, 7:31:32 AM9/10/18
to snip...@googlegroups.com, yongke...@gmail.com
Yongkee,

Thanks for the feedback. I updated both the tarball and the git repo. I double-checked it and it appears to be working. Please check again, and if you are still running into problems, please contact us.

I have tried with Pin 3.5, and that did work. I hope that they haven’t made any significant changes since then. If you run into issues, tell us and we’ll work to fix them.

Note, that because of how Pin 3 works, we now automatically download Xed and mbuild on the first make of Sniper, as we can no longer use the version inside of Pin for the standalone version of Sniper (as it is compiled against PinCRT).

Thanks,
Trevor

--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chen Zou

unread,
Sep 26, 2018, 3:08:40 PM9/26/18
to Sniper simulator
Hi Trevor,

I tested on CentOS 7 with kernel 3.10.0-862.11.6.el7.x86_64 and ubuntu 18.04 with kernel 4.15.0-34-generic, but none of them seems to work properly with pin-3.5-97503.
Snipersim can be compiled successfully on CentOS 7, but it would fail on the test/fft:

A@B:$ ~/sniper/test/fft$ make
../../run-sniper -v -n 1 -c gainestown --roi -- ./fft -p 1
[SNIPER] Warning: Unable to use physical addresses for shared memory simulation.
[SNIPER] Running ['/home/chenzou/sniper/record-trace', '-o', '/tmp/tmpiJzviD/run_benchmarks', '-v', '--roi', '-e', '1', '-s', '0', '-r', '1', '--follow', '--routine-tracing', '--', './fft', '-p', '1']
[SNIPER] Start
[SNIPER] Running ['bash', '-c', '/home/chenzou/sniper/lib/sniper -c /home/chenzou/sniper/config/base.cfg --general/total_cores=1 --general/output_dir=/home/chenzou/sniper/test/fft --config=/home/chenzou/sniper/config/nehalem.cfg --config=/home/chenzou/sniper/config/gainestown.cfg -g --general/magic=true -g --traceinput/stop_with_first_app=true -g --traceinput/restart_apps=false -g --traceinput/stop_with_first_app=false -g --traceinput/enabled=true -g --traceinput/emulate_syscalls=true -g --traceinput/num_apps=1 -g --traceinput/trace_prefix=/tmp/tmpiJzviD/run_benchmarks']
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running pre-ROI region in  CACHE_ONLY mode
[SNIPER] Running application ROI in DETAILED mode
[SNIPER] Running post-ROI region in FAST_FORWARD mode
[SNIPER] --------------------------------------------------------------------------------
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
[SIFT_RECORDER] Running /home/chenzou/.pin-3.5-97503/pin -mt -injection child -xyzzy -pause_tool 0 -ifeellucky -follow_execv -t /home/chenzou/sniper/sift/recorder/obj-intel64/sift_recorder -verbose 1 -debug 0 -roi 1 -roi-mpi 0 -f 0 -d 0 -b 0 -o /tmp/tmpiJzviD/run_benchmarks -e 1 -s 0 -r 1 -pa 0 -rtntrace 1 -stop 0    -- ./fft -p 1
[SIFT_RECORDER:0:0] Output = [/tmp/tmpiJzviD/run_benchmarks.app0.th0.sift]
[SIFT_RECORDER:0:0] Response = [/tmp/tmpiJzviD/run_benchmarks_response.app0.th0.sift]

FFT with Blocking Transpose
   1024 Complex Doubles
   1 Processors
   65536 Cache lines
   16 Byte line size
   4096 Bytes per page

[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
[SIFT_RECORDER:0] ROI Begin
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 1.48 seconds
[SNIPER] Simulated 1.1M instructions, 1.3M cycles, 0.88 IPC
[SNIPER] Simulation speed 773.2 KIPS (773.2 KIPS / target core - 1293.4ns/instr)
[SNIPER] Sampling: executed 65.72% of simulated time in detailed mode
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[TRACE:0] -- DONE --
[SIFT_RECORDER:0] ROI End
[SIFT_RECORDER] Failed to print backtrace.
[SIFT_RECORDER] Internal exception:Exception Code: ACCESS_INVALID_ADDRESS. Exception Address = 0x7f1c1d9409a9. Access Type: UNKNOWN. Access Address = 0x000000000
C: Tool (or Pin) caused signal 11 at PC 0x7f1c1d9409a9
Pin app terminated abnormally due to signal 11.
[SNIPER] End
[SNIPER] Elapsed time: 4.26 seconds


Optional: Run '../../tools/cpistack.py' in this directory to generate cpi-stack output for this run
Optional: Run '../../tools/mcpat.py' in this directory to generate power output for this run
Optional: Run '../../tools/dumpstats.py' in this directory to view detailed statistics for this run
Optional: Run '../../tools/gen_topology.py' in this directory to view the system topology for this run




In terms of Ubuntu 18.04, it doesn't compile successfully. It failed at the last linking stage.

Error while building snipersim: “relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC”


Any ideas would be helpful. And is there a recommended platform/kernel for snipersim?

Regards,
Chen

Trevor E. Carlson

unread,
Sep 26, 2018, 10:19:17 PM9/26/18
to snip...@googlegroups.com, zine....@gmail.com
Chen Zou,

Thanks for this detailed feedback.

It does look like CentOS 7 is working correctly, but there does appear to be is a minor bug when the sift recorder crashes. This is caused by the sift recorder being disconnected from the pipe to Sniper, which causes it to crash. In fact, this shouldn’t affect timing simulation, as Sniper has completed and most likely saved its output correctly. You can check for the sim.out file as a first way to check to see how things look. I don’t think we’ll look into fixing this bug right now, as it should not affect the simulation results. Patches are definitely welcome if you’d like to fix this problem. That said, if you do run into a timing simulation issue, please tell us.

We also have been able to use Ubuntu 16.04 without issue. I tried compiling Sniper on 18.04, but get the same errors that you are seeing. To get things working, I tried to compile some additional applications with -fPIC, but was not able to fix the issue (standalone.cc still appeared to be preventing PIE binaries because of that relocation issue). According to [1], we can use the -no-pie option to get things working. I added that option and was able to compile Sniper successfully using both gcc-7 and gcc-5. Please try the attached patch and tell me if that fixes the issues that you are seeing.

sniper-7.0-ubuntu-18.04-compile-fix.patch

Chen Zou

unread,
Sep 27, 2018, 6:33:02 PM9/27/18
to tcar...@comp.nus.edu.sg, snip...@googlegroups.com
Hi, Trevor,

Thanks for the reply.

For Centos 7, the simulation is completed and the sim.out is generated.

But it seems sniper doesn't work well under Ubuntu 18.04.
It seems SIFT failed and then hangs.

Though working on Centos7 is good for me already. Thanks for the work on Pin v3.


A@B:~/sniper/test/fft$ make
cc -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -mno-avx -mno-avx2 -I/home/chenzou/sniper/include    -c -o fft.o fft.c
fft.c:127:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(argc, argv)
 ^
fft.c: In function ‘main’:
fft.c:151:15: warning: implicit declaration of function ‘getopt’ [-Wimplicit-function-declaration]
   while ((c = getopt(argc, argv, "p:m:n:l:stoh")) != -1) {
               ^
fft.c:338:3: warning: implicit declaration of function ‘InitX’ [-Wimplicit-function-declaration]
   InitX(N, x);                  /* place random values in x */
   ^
fft.c:345:5: warning: implicit declaration of function ‘PrintArray’ [-Wimplicit-function-declaration]
     PrintArray(N, x);
     ^
fft.c:348:3: warning: implicit declaration of function ‘InitU’ [-Wimplicit-function-declaration]
   InitU(N,umain);               /* initialize u arrays*/
   ^
fft.c:349:3: warning: implicit declaration of function ‘InitU2’ [-Wimplicit-function-declaration]
   InitU2(N,umain2,rootN);
   ^
fft.c: At top level:
fft.c:659:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 InitX(N, x)
 ^
fft.c:678:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 InitU(N, u)
 ^
fft.c: In function ‘InitU’:
fft.c:694:3: warning: ‘return’ with no value, in function returning non-void
   return;
   ^
fft.c: At top level:
fft.c:703:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 InitU2(N, u, n1)
 ^
fft.c:723:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 BitReverse(M, k)
 ^
fft.c: In function ‘FFT1D’:
fft.c:743:6: warning: type of ‘MyNum’ defaults to ‘int’ [-Wimplicit-int]
 void FFT1D(direction, M, N, x, scratch, upriv, umain2, MyNum, l_transtime,
      ^
fft.c:815:3: warning: implicit declaration of function ‘Transpose’ [-Wimplicit-function-declaration]
   Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
   ^
fft.c:830:5: warning: implicit declaration of function ‘FFT1DOnce’ [-Wimplicit-function-declaration]
     FFT1DOnce(direction, m1, n1, upriv, &scratch[2*j*(n1+pad_length)]);
     ^
fft.c:831:5: warning: implicit declaration of function ‘TwiddleOneCol’ [-Wimplicit-function-declaration]
     TwiddleOneCol(direction, n1, N, j, umain2, &scratch[2*j*(n1+pad_length)],
     ^
fft.c:890:7: warning: implicit declaration of function ‘Scale’ [-Wimplicit-function-declaration]
       Scale(n1, N, &x[2*j*(n1+pad_length)]);
       ^
fft.c:976:7: warning: implicit declaration of function ‘CopyColumn’ [-Wimplicit-function-declaration]
       CopyColumn(n1, &scratch[2*j*(n1+pad_length)], &x[2*j*(n1+pad_length)]);
       ^
fft.c: At top level:
fft.c:1011:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 TwiddleOneCol(direction, n1, N, j, u, x, pad_length)
 ^
fft.c:1043:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 Scale(n1, N, x)
 ^
fft.c:1059:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 Transpose(n1, src, dest, MyNum, MyFirst, MyLast, pad_length)
 ^
fft.c:1151:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 CopyColumn(n1, src, dest)
 ^
fft.c:1167:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 Reverse(N, M, x)
 ^
fft.c:1186:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 FFT1DOnce(direction, M, N, u, x)
 ^
fft.c:1238:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 PrintArray(N, x)
 ^
cc fft.o -lm -static -L/home/chenzou/sniper/lib -pthread  -o fft
../../run-sniper -v -n 1 -c gainestown --roi -- ./fft -p 1
[SNIPER] Warning: Unable to use physical addresses for shared memory simulation.
[SNIPER] Running ['/home/chenzou/sniper/record-trace', '-o', '/tmp/tmpVVYTjM/run_benchmarks', '-v', '--roi', '-e', '1', '-s', '0', '-r', '1', '--follow', '--routine-tracing', '--', './fft', '-p', '1']
[SNIPER] Start
[SNIPER] Running ['bash', '-c', '/home/chenzou/sniper/lib/sniper -c /home/chenzou/sniper/config/base.cfg --general/total_cores=1 --general/output_dir=/home/chenzou/sniper/test/fft --config=/home/chenzou/sniper/config/nehalem.cfg --config=/home/chenzou/sniper/config/gainestown.cfg -g --general/magic=true -g --traceinput/stop_with_first_app=true -g --traceinput/restart_apps=false -g --traceinput/stop_with_first_app=false -g --traceinput/enabled=true -g --traceinput/emulate_syscalls=true -g --traceinput/num_apps=1 -g --traceinput/trace_prefix=/tmp/tmpVVYTjM/run_benchmarks']
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running pre-ROI region in  CACHE_ONLY mode
[SNIPER] Running application ROI in DETAILED mode
[SNIPER] Running post-ROI region in FAST_FORWARD mode
[SNIPER] --------------------------------------------------------------------------------
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
[SIFT_RECORDER] Running /home/chenzou/.pin-3.5-97503/pin -mt -injection child -xyzzy -pause_tool 0 -ifeellucky -follow_execv -t /home/chenzou/sniper/sift/recorder/obj-intel64/sift_recorder -verbose 1 -debug 0 -roi 1 -roi-mpi 0 -f 0 -d 0 -b 0 -o /tmp/tmpVVYTjM/run_benchmarks -e 1 -s 0 -r 1 -pa 0 -rtntrace 1 -stop 0    -- ./fft -p 1
E: Unable to load /home/chenzou/sniper/sift/recorder/obj-intel64/sift_recorder: dlopen failed: cannot locate symbol "deflateEnd" referenced by "/home/chenzou/sniper/sift/recorder/obj-intel64/sift_recorder"...
[SNIPER] WARNING: No SIFT connections made yet. Waiting...


Regards,
Chen


Trevor E. Carlson

unread,
Sep 27, 2018, 10:37:08 PM9/27/18
to snip...@googlegroups.com, zine....@gmail.com
Chen Zou,

Thanks for the feedback.

It looks like the problem stems from the fact that the new version of Pin requires PinCRT, and therefore can’t link to typical libraries that we were expecting (zlib in this case). To fix this problem for now, I’ve included a patch that applies to Sniper 7.0 that disables the use of zlib when compiling with Pin 3. If you use the Pinplay version [1] of Pin, zlib support is enabled as Pinplay ships with a version of zlib that works. Below is some example output from Sniper running the fft application on Ubuntu 18.04, compiled with gcc-7 and using Pin 3.7.

Thanks,
Trevor


sniper-7.0-ubuntu-18.04-compile-fix-v2.patch

Aaron

unread,
Sep 28, 2018, 6:28:08 AM9/28/18
to Sniper simulator
Hi Trevor,
I have install the Sniper 7.0 with pinplay-drdebug-3.5 and pin 2.14 on ubuntu 14.04.
There is no problem when compiling with Pin 2.14, but there is something wrong with pinplay-3.5. The result is shown below running the test/fft application.
cc -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -mno-avx -mno-avx2 -I/home/wl/sniper-7.0/include    -c -o fft.o fft.c
cc fft.o -lm -static -L/home/wl/sniper-7.0/lib -pthread  -o fft
../../run-sniper -v -n 1 -c gainestown --roi -- ./fft -p 1
[SNIPER] Warning: Unable to use physical addresses for shared memory simulation.
[SNIPER] Running ['/home/wl/sniper-7.0/record-trace', '-o', '/tmp/tmpgaIhPJ/run_benchmarks', '-v', '--roi', '-e', '1', '-s', '0', '-r', '1', '--follow', '--routine-tracing', '--', './fft', '-p', '1']
[SNIPER] Start
[SNIPER] Running ['bash', '-c', '/home/wl/sniper-7.0/lib/sniper -c /home/wl/sniper-7.0/config/base.cfg --general/total_cores=1 --general/output_dir=/home/wl/sniper-7.0/test/fft --config=/home/wl/sniper-7.0/config/nehalem.cfg --config=/home/wl/sniper-7.0/config/gainestown.cfg -g --general/magic=true -g --traceinput/stop_with_first_app=true -g --traceinput/restart_apps=false -g --traceinput/stop_with_first_app=false -g --traceinput/enabled=true -g --traceinput/emulate_syscalls=true -g --traceinput/num_apps=1 -g --traceinput/trace_prefix=/tmp/tmpgaIhPJ/run_benchmarks']
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running pre-ROI region in  CACHE_ONLY mode
[SNIPER] Running application ROI in DETAILED mode
[SNIPER] Running post-ROI region in FAST_FORWARD mode
[SNIPER] --------------------------------------------------------------------------------
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
[SIFT_RECORDER] Running /home/wl/sniper-7.0/pin_kit/pin -mt -injection child -xyzzy -pause_tool 0 -ifeellucky -follow_execv -t /home/wl/sniper-7.0/sift/recorder/obj-intel64/sift_recorder -verbose 1 -debug 0 -roi 1 -roi-mpi 0 -f 0 -d 0 -b 0 -o /tmp/tmpgaIhPJ/run_benchmarks -e 1 -s 0 -r 1 -pa 0 -rtntrace 1 -stop 0    -- ./fft -p 1
[SIFT_RECORDER:0:0] Output = [/tmp/tmpgaIhPJ/run_benchmarks.app0.th0.sift]
[SIFT_RECORDER:0:0] Response = [/tmp/tmpgaIhPJ/run_benchmarks_response.app0.th0.sift]

FFT with Blocking Transpose
   1024 Complex Doubles
   1 Processors
   65536 Cache lines
   16 Byte line size
   4096 Bytes per page

[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
[SIFT_RECORDER:0] ROI Begin
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 1.49 seconds
[SNIPER] Simulated 1.1M instructions, 1.3M cycles, 0.89 IPC
[SNIPER] Simulation speed 766.0 KIPS (766.0 KIPS / target core - 1305.4ns/instr)
[SNIPER] Sampling: executed 65.33% of simulated time in detailed mode
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[TRACE:0] -- DONE --
[SIFT_RECORDER:0] ROI End
[SIFT_RECORDER] Failed to print backtrace.
[SIFT_RECORDER] Internal exception:Exception Code: ACCESS_INVALID_ADDRESS. Exception Address = 0x2b0f23c0a769. Access Type: UNKNOWN. Access Address = 0x000000000
C: Tool (or Pin) caused signal 11 at PC 0x2b0f23c0a769
Pin app terminated abnormally due to signal 11.
[SNIPER] End
[SNIPER] Elapsed time: 4.26 seconds


Optional: Run '../../tools/cpistack.py' in this directory to generate cpi-stack output for this run
Optional: Run '../../tools/mcpat.py' in this directory to generate power output for this run
Optional: Run '../../tools/dumpstats.py' in this directory to view detailed statistics for this run
Optional: Run '../../tools/gen_topology.py' in this directory to view the system topology for this run

Trevor E. Carlson

unread,
Sep 28, 2018, 7:07:41 AM9/28/18
to snip...@googlegroups.com, wangli...@gmail.com
Aaron,

     In fact, that is a small bug, but it shouldn’t effect the simulation results. Sniper (the timing simulator) is disconnecting from the pipe back to the trace recorder (the functional simulator), which causes it to crash. But, I suspect that the Sniper timing simulation is fine (check to see if there is an output file (sim.out)). It would be nice to fix this issue, but since it doesn’t affect the timing simulation, it isn’t a high priority right now.

Trevor

Aaron

unread,
Sep 28, 2018, 8:03:00 AM9/28/18
to Sniper simulator
Thanks Trevor. THERE is the output file sim.out. 
When I try to run sniper on the Ubuntu bash on windows 10, there are also some errors. The result shows below.
The Ubuntu bash is working with Ubuntu 16.04.5 LTS.
../../run-sniper -v -n 1 -c gainestown --roi -- ./fft -p 1
[SNIPER] Warning: Unable to use physical addresses for shared memory simulation.
[SNIPER] Running ['/home/wl/sniper/record-trace', '-o', '/tmp/tmpU1mUG7/run_benchmarks', '-v', '--roi', '-e', '1', '-s', '0', '-r', '1', '--follow', '--routine-tracing', '--', './fft', '-p', '1']
[SNIPER] Start
[SNIPER] Running ['bash', '-c', '/home/wl/sniper/lib/sniper -c /home/wl/sniper/config/base.cfg --general/total_cores=1 --general/output_dir=/home/wl/sniper/test/fft --config=/home/wl/sniper/config/nehalem.cfg --config=/home/wl/sniper/config/gainestown.cfg -g --general/magic=true -g --traceinput/stop_with_first_app=true -g --traceinput/restart_apps=false -g --traceinput/stop_with_first_app=false -g --traceinput/enabled=true -g --traceinput/emulate_syscalls=true -g --traceinput/num_apps=1 -g --traceinput/trace_prefix=/tmp/tmpU1mUG7/run_benchmarks']
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using SIFT/trace-driven frontend
[SNIPER] Running pre-ROI region in  CACHE_ONLY mode
[SNIPER] Running application ROI in DETAILED mode
[SNIPER] Running post-ROI region in FAST_FORWARD mode
[SNIPER] --------------------------------------------------------------------------------
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
[SIFT_RECORDER] Running /home/wl/sniper/pin_kit/pin -mt -injection child -xyzzy -pause_tool 0 -ifeellucky -follow_execv -t /home/wl/sniper/sift/recorder/obj-intel64/sift_recorder -verbose 1 -debug 0 -roi 1 -roi-mpi 0 -f 0 -d 0 -b 0 -o /tmp/tmpU1mUG7/run_benchmarks -e 1 -s 0 -r 1 -pa 0 -rtntrace 1 -stop 0    -- ./fft -p 1
bash: /home/wl/sniper/pin_kit/pin: cannot execute binary file: Exec format error
[SNIPER] WARNING: No SIFT connections made yet. Waiting...


[SNIPER] ERROR: Could not establish SIFT connection, aborting! Check benchmark-app*.log for errors.
[SNIPER] End
[SNIPER] Elapsed time: 60.69 seconds
Makefile:8: recipe for target 'run_fft' failed
make: *** [run_fft] Error 1


Aaron

unread,
Sep 28, 2018, 8:13:30 AM9/28/18
to Sniper simulator
Hi Trevor,
What is the difference of results from Sniper with Pin2  and that from sniper with Pin 3? 
Is the sniper with pin3 more desirable for simulating benchmark runtime or getting communication traces of network-on-chip?

Thank you very much!
Aaron

Trevor E. Carlson

unread,
Sep 28, 2018, 8:33:53 AM9/28/18
to snip...@googlegroups.com, wangli...@gmail.com
Aaron,

I wouldn’t say Pin3 is significantly better than Pin2 for simulation purposes. They both provide an instruction trace into Sniper for timing simulation purposes. The real reason why it is important is so we can use Sniper on modern machines.

Trevor

Aaron

unread,
Sep 28, 2018, 9:34:57 AM9/28/18
to Sniper simulator
Hi Trevor,
when I try to add the parsec and splash2 benchmarks(http://snipersim.org/packages/sniper-benchmarks.tbz) to sniper 7.0 with pin 3, the output always show that 
ERROR: Sniper has not been compiled. Please compile Sniper before trying to run an application.
The process of building and running is same as the previous setting (https://groups.google.com/d/msg/snipersim/7WJ1VR6a3zI/ovyWSPGEBwAJ)

Thanks!
Aaron

On Thursday, 6 September 2018 21:13:15 UTC+8, Trevor E. Carlson wrote:

Quintin Fettes

unread,
Oct 2, 2018, 3:21:20 AM10/2/18
to Sniper simulator
Hi Trevor,

I have the same issue Aaron described:

when I try to add the parsec and splash2 benchmarks(http://snipersim.org/packages/sniper-benchmarks.tbz) to sniper 7.0 with pin 3, the output always show that 
ERROR: Sniper has not been compiled. Please compile Sniper before trying to run an application.
The process of building and running is same as the previous setting (https://groups.google.com/d/msg/snipersim/7WJ1VR6a3zI/ovyWSPGEBwAJ)

I applied the patch you supplied in this thread to successfully compile the simulator on Debian 9 (GCC 6.3, Sniper 7.0 with Pin 3). With a little effort, I also successfully compiled the splash and parsec benchmarks. It looks like the file run-sniper is looking for a file sniper-7.0/lib/pin_sim.so which does not exist when compiling on my system with your patch. Any thoughts on what might be happening?

Trevor E. Carlson

unread,
Oct 2, 2018, 3:36:07 AM10/2/18
to snip...@googlegroups.com, qfe...@gmail.com
Quintin,

Thanks for the updates. I’m glad to hear that the Sniper-7.0 patches have allowed you to get Sniper working with modern Linux versions.

Could you include the steps that you’ve taken to get the benchmarks working on your system? It would be great to add those updates to the main package so that others could benefit.

You are right about the benchmarks checking for pin_sim.so. With Sniper 7.0 and Pin3, the pin-only version of Sniper is no longer compiled (the pin_sim.so pintool), and therefore we only support the pin3 frontend with the non-pintool Sniper backend now. You can safely comment out these checks in $BENCHMARKS_ROOT/run-sniper.

Trevor

Quintin Fettes

unread,
Oct 2, 2018, 2:16:00 PM10/2/18
to Sniper simulator
Trevor,

Absolutely. I'll address 2 things in this post: 1) Compiling parsec and splash2 benchmarks, 2) a small bug with parallel make on the simulator

1) Compiling parsec and splash2 
Here are the step I followed to successfully compile splash2 and parsec on Debian 9 (sniper 7.0, gcc 6.3, pin 3.7). To see how general this solution was, I  successfully followed the same steps on my other setup, Ubuntu 18.04 (sniper 7.0, gcc 7.3, pin 3.7)

wget http://snipersim.org/packages/sniper-benchmarks.tbz
tar xjf sniper
-benchmarks.tbz
cd benchmarks
export SNIPER_ROOT=/path/to/sniper
export BENCHMARKS_ROOT=$(pwd)

  1. Edit benchmarks/MAKEFILE ; This only fixed parsec and splash 2, I did not attempt to fix cpu2006 or npb, and both will fail to compile. comment out the following lines:
    • make -C cpu2006
    • make -C npb
    • make -C local
    • make -C cpu2006 clean
    • make -C npb clean
    • make -C local clean
  2. Edit benchmarks/parsec/parsec-2.1/pkgs/apps/bodytrack/parsec/gcc-sniper.bldconf
    • Add
      • CXXFLAGS="-std=gnu++98 ${CXXFLAGS} ${HOOKS_CXXFLAGS}"
  3. Edit src files in ferret. Replace all instances of HUGE with HUGE_VAL. The files needing modified are listed below
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/src/lsh/LSH_query.c
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/src/lsh/LSH_query_batch.c
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/benchmark/ferret-parallel.c
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/benchmark/ferret-serial.c
  4. Edit benchmarks/parsec/parsec-2.1/pkgs/tools/cmake/parsec/gcc-sniper.bldconf
    • Modify line 8 to read (added -std=gnu++98 flag):
      build_env="CC=\"${CC}\" CXXFLAGS=\"-std=gnu++98 ${CXXFLAGS} -fexceptions\" LDFLAGS=\"-L${CC_HOME}/lib64 -L${CC_HOME}/lib -L${PARSECDIR}/pkgs/libs/hooks/inst/${PARSECPLAT}/lib\""
  5. Edit benchmarks/parsec/parsec-2.1/pkgs/apps/x264/parsec/gcc-sniper.bldconf
    •  Add 
      CC="${HOOKS_CC} -no-pie"
  6. RUN MAKE. IT WILL FAIL. WHEN IT GETS TO THE SSL LIBRARY. THE ERROR WILL READ: 
    smime.pod around line 272: Expected text after =item, not a number
    smime.pod around line 276: Expected text after =item, not a number
    smime.pod around line 280: Expected text after =item, not a number
    smime.pod around line 285: Expected text after =item, not a number
    smime.pod around line 289: Expected text after =item, not a number
    • This is the only error I couldn't fix before running make once because the src is not downloaded prior to the first run of make
  7. Edit benchmarks/parsec/parsec-2.1/pkgs/libs/ssl/src/Makefile.org
    • Line 612 is:
      install: all install_docs install_sw
    • change it to:
      install: all install_sw
    • This is a hack I found online. It just prevents the docs from being compiled
  8. Run make again. the benchmarks should now compile correctly


3) a small bug with parallel make on the simulator

When using the parallel make command on my Ubuntu 18.04 setup

make -j 8

The sift recorder failed to compile. which lead to the following error when I tried to run an initial test

cd test/fft
make run

...
[SIFT_RECORDER] Running /home/quintin/code/sniper-7.0/pin_kit/pin -mt -injection child -xyzzy -pause_tool 0 -ifeellucky -follow_execv -t /home/quintin/code/sniper-7.0/sift/recorder/obj-intel64/sift_recorder -verbose 1 -debug 0 -roi 1 -roi-mpi 0 -f 0 -d 0 -b 0 -o /tmp/tmp49odEB/run_benchmarks -e 1 -s 0 -r 1 -pa 0 -rtntrace 1 -stop 0    -- ./fft -p 1
E: Unable to load /home/quintin/code/sniper-7.0/sift/recorder/obj-intel64/sift_recorder

However, it was easily fixed by recompiling without the parallel option
cd path/to/sniper
make

It's a small bug but I thought you'd like to be aware of it.

Wang Xu

unread,
Oct 9, 2018, 5:23:03 PM10/9/18
to Sniper simulator
Hello all,
I am using Ubuntu 16.04.5 LTS(gcc 5.4) and pin 3.2. I am also getting the error: ERROR: Could not establish SIFT connection, aborting! Check benchmark-app*.log for errors.
I tried it without parallel make and the error is still on. Does anyone solve this? If someone have successfully run version 7 in ubuntu 16.04 or 18.04, please help me.
Thanks 

Trevor E. Carlson

unread,
Oct 9, 2018, 6:14:01 PM10/9/18
to snip...@googlegroups.com, scott...@gmail.com
Wang Xu,

It is difficult to tell where the problems are without more details of the issue. Was a benchmark-app*.log file created? If not, I’d suggest that you try to generate a SIFT file with the sniper/record-trace application and see if that works as a first step.

Trevor

Trevor E. Carlson

unread,
Oct 9, 2018, 6:45:04 PM10/9/18
to snip...@googlegroups.com, Wang Xu
Wang Xu,

To fix this problem, I’d recommend either downloading and using a version of Pinplay [1] (a drop-in replacement for Pin) which contains a PinCRT-compiled version of zlib, or try using the patch provided in an earlier message [2] (in either case, you’ll need to recompile Sniper). The patch disables the use of zlib if Pinplay is not found.

Trevor

[2] https://groups.google.com/forum/#!msg/snipersim/nWDhtgjG2NY/Ps5f_1WkAQAJ

On Oct 10, 2018, at 6:29 AM, Wang Xu <scott...@gmail.com> wrote:

Thanks for your reply, Trevor.
There is no "benchmark-app*.file" created. I ran "./record-trace -- ./hello",  and got the following error:
[RECORD-TRACE] Using the Pin frontend (sift/recorder)
E: Unable to load /home/wang/Documents/sniper-7.0/sift/recorder/obj-intel64/sift_recorder: dlopen failed: cannot locate symbol "deflateEnd" referenced by "/home/wang/Documents/sniper-7.0/sift/recorder/obj-intel64/sift_recorder"...

Thanks

Wang Xu

unread,
Oct 9, 2018, 7:58:25 PM10/9/18
to Sniper simulator
Thanks, Trevor. I tried Pinplay and it worked.

Quintin Fettes

unread,
Oct 23, 2018, 11:20:48 AM10/23/18
to Sniper simulator
Trevor,

Both patches (sniper-7.0-ubuntu-18.04-compile-fix.patch) and (sniper-7.0-ubuntu-18.04-compile-fix-v2.patch) are no longer available for download. I could use both to compile on 16.04 and 18.04 respectively.

Trevor E. Carlson

unread,
Oct 23, 2018, 8:16:30 PM10/23/18
to snip...@googlegroups.com, qfe...@gmail.com
Quintin,

Very weird. This looks like a Google Groups bug, as I also get a Not Found / 404 error when I try to click on the Download link when viewing the attachments.

As Groups is currently not working as expected, I am sending a version to you directly. I’ve also sent feedback to Google with a detailed explanation of the issue. I’d like to get some feedback on these patches before integrating them into the mainline, so please let me know how they work for you.

Thanks,
Trevor

sniper-7.0-ubuntu-18.04-compile-fix-v2.patch
sniper-7.0-ubuntu-18.04-compile-fix.patch

Quintin Fettes

unread,
Oct 23, 2018, 8:58:26 PM10/23/18
to Sniper simulator
Trevor,

The first patch (sniper-7.0-ubuntu-18.04-compile-fix.patch) when used with Ubuntu16.04 and pinplay3.5 appears to be functioning correctly.

However, pinplay3.5 will not compile correctly with Ubuntu18.04; therefore, I am forced to use pin3.7. The second patch (sniper-7.0-ubuntu-18.04-compile-fix-v2.patch) used on Ubuntu18.04 with pin3.7 compiles correctly and appears to run correctly only when the number of cores is smaller than 8. I noted this issue on a seperate thread (https://groups.google.com/forum/#!topic/snipersim/Mv6lkV5Tsyk)

Steven Tan

unread,
Feb 10, 2019, 11:50:23 AM2/10/19
to Sniper simulator
This is probably a noob question, but where do I find the benchmarl-app*.log file found?
Reply all
Reply to author
Forward
0 new messages