How to compile Sniper 8.1?

81 views
Skip to first unread message

Kleber Kruger

unread,
Nov 5, 2024, 3:25:41 PM11/5/24
to Sniper simulator
Hello, 

I updated Sniper Sim to version 8.1, which is available on GitHub, but when running on the Docker image according to this tutorial (https://snipersim.org/w/Getting_Started), Sniper presents the following output: 

Detach Service Count: 1 Pin: pin-3.31 -98861-71afcc22f Copyright 2002-2024 Intel Corporation.

[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] ---------------------- -------------------------------------------------- -------- 
[SNIPER] WARNING: No SIFT connections made yet. Waiting for a total of 360 seconds.

From what I've seen, the new recent update is trying to run on newer versions of Ubuntu and Pin more updated. However, what are the steps to compile and run?

The instructions I used were:

cd docker
make
make run
cd ..
make -j 8 
cd test/fft; make run

Kleber Kruger

unread,
Nov 5, 2024, 4:50:31 PM11/5/24
to Sniper simulator
To fix this problem, I had to compile with 
make USE_PIN=1 -j. Using USE_SDE the sniper run shows "WARNING: No SIFT connections had been made yet."
Why was it not possible to run by USE_SDE? Wouldn't it be better to use USE_PIN as the default?

Trevor E. Carlson

unread,
Nov 5, 2024, 8:41:18 PM11/5/24
to snip...@googlegroups.com, kleber...@gmail.com
Kleber,

     Thanks for these questions. We haven’t tested the Docker image yet with the latest version of Sniper. It uses an older OS that allows us to compile Parsec. Our goal is to enable SDE on the Docker image for the most compatibility, if possible.

     It would be great to see if there are any output files saved that shows why this error is occurring. If you find the output, and can post it, that would be great. Adding the error reports as a GitHub Issue is probably the most helpful.

     The reason why SDE is more compatible is that it allows you to run binaries for the correct architecture selected (it will add (via software emulation) or remove support for instructions depending on your target architecture, not your host architecture). Pin does not support these translations, leading to less compatibility.

Trevor

On Nov 5, 2024, at 15:50, Kleber Kruger <kleber...@gmail.com> wrote:

To fix this problem, I had to compile with 
--
--
--
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.
To view this discussion visit https://groups.google.com/d/msgid/snipersim/5ee354e1-e712-4bf8-a077-bc829618b2e3n%40googlegroups.com.

Kleber Kruger

unread,
Nov 7, 2024, 4:54:07 AM11/7/24
to Sniper simulator
I investigated the issue and found that SDE version 9.44.0 gives an error on Intel Core i7-11700 processor:

SDE ERROR: valid
Unexpected invalid CPUID leaf
 at (no-file):139 Function (no-func)
A: /tmp_proj/sde_jen/workspace/pypl-sde-nightly-master/GitSDE-master-9.44.0-dev-24-gac5cad0f4/pin/Source/pin/vm_u/vm_signal_impl_unix.cpp: NotifyExit: 1248: assertion failed: _initialized

################################################################################
## STACK TRACE
################################################################################
??? at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x0002f0992 

LEVEL_VM::VM::Shutdown+0x00000008a at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x000234bea 

LEVEL_VM::VM_SHUTDOWN_MANAGER::CompleteShutdown+0x000000074 at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x0002350e4 

LEVEL_VM::VM_SHUTDOWN_MANAGER::DoShutdown+0x00000007c at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x000239aec 

LEVEL_VM::VM_Shutdown+0x0000000a7 at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x00023ab27 

??? at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x0001c888a 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x00049b3da 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x00010d071 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x0001b7e6b 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x00025cef7 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x000258bdd 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x0001b69d3 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x00008c64a 

??? at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x00008cc68 

main+0x000000028 at /home/kleber.kruger/snipersim/sift/recorder/obj-intel64/sde_sift_recorder.so+0x00007b942 

LEVEL_INJECTOR::UNIX_INJECTEE::StartTool+0x000000197 at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x000348a27 

LEVEL_INJECTOR::UNIX_INJECTEE::RunMainThreadOnPinStackAttach+0x00000036d at /home/kleber.kruger/snipersim/sde_kit/intel64/pinbin+0x00034ee5d 


Detach Service Count: 1
Pin: pin-3.31-98861-71afcc22f
Copyright 2002-2024 Intel Corporation.

To fix it, I need to run SDE with -tgl flag.
This option selects emulation for Intel Tiger Lake architecture processors, including the i7-11700. However, to ensure that the simulator has access to all available instructions, it is recommended that you run SDE with the—future option. This flag extends the emulator's coverage to support all instructions, regardless of the processor generation. 
The modification to the run-sniper.py script sets the -future flag as the default when running SDE, allowing emulation of any instructions introduced in newer processors. This choice provides the broadest range of instruction compatibility, ensuring more robust execution and compatibility with recent architectures.

I made a pull request on GitHub that fixes the mentioned problem by expanding compatibility to newer processors using side-9.44.0. I would be grateful if you could analyze it.

Best regards

Kleber Kruger

unread,
Nov 8, 2024, 10:43:27 AM11/8/24
to Trevor E. Carlson, snip...@googlegroups.com
Detach Service Count: 1

Pin: pin-3.31-98861-71afcc22f
Copyright 2002-2024 Intel Corporation.

To fix it, I need to run SDE with -tgl flag. 
This option selects emulation for Intel Tiger Lake architecture processors, which includes the i7-11700.
I hope this information is helpful to you.
--
Kleber Kruger

Reply all
Reply to author
Forward
0 new messages