2017-08-24 146 views
1

我已經安裝狙擊模擬器從Sniper和我能夠使用make和/斌/ ls命令使用以下事項>使用狙擊模擬器

./run-sniper成功執行FFT測試程序與英特爾TBB程序工作 -/bin/ls

這些命令用狙擊手成功執行。

我已編制採用了英特爾TBB的示例程序sub_string_finder_extended.cpp

GCC -02 -DNDEBUG -o sub_string_finder_extended.gcc sub_string_finder_extended.cpp -ltbb -lrt ./sub_string_finder_extended.gcc

成功執行沒有任何錯誤,但當我運行它與狙擊使用

./run-sniper - ./sub_s tring_finder_extended.gcc

它顯示下列輸出

[SNIPER]開始[SNIPER] 後掛起--------------------- -------------------------------------------------- --------- [SNIPER]使用針前端[SNIPER]在具體模式[SNIPER] 運行完整的應用程序 狙擊-------------------- -------------------------------------------------- ---------- [SNIPER]啓用性能模型[SNIPER]設置儀器模式詳細
完成建設字符串。

我用google搜索了一下,但是無法找到任何有關英特爾TBB在狙擊手上工作的話題,但是在狙擊手的維基頁面上提到了intel TBB程序的支持。

編輯: 狙擊V-6.1 OS-的ubuntu 12.04 LTS

UNAME -r輸出 - > 3.5.0-23泛型

英特爾TBB(從編譯) - >https://github.com/01org/tbb

+0

能否請您提供一些附加信息:操作系統,TBB版本 –

+0

@ ntfs.hard增加的信息 –

回答

2

至於我可以告訴大家,TBB仍然在正常工作Sniper

我想你可能會遇到的問題是,詳細的模擬可能需要相當長一段時間,因此,就像狙擊手掛它可能會出現。使用Pin的mix-mt工具進行快速檢查,結果表明該應用程序總共執行了53B條指令,詳細仿真需要一天以上的時間。一種方法來檢查,看看是怎麼回事,在狙擊手將添加-sprogresstrace選項可啓用${SNIPER_ROOT}/scripts/progresstrace.py腳本。

這些例子在Ubuntu 12.04.5 LTS(3.13.0-32-generic)上運行,使用的TBB的gitid爲eb6336ab,Sniper 6.1和Pinplay-2.2-pin-2.14-71313。

一個簡單的例子

命令行選項解釋

  1. 運行帶2芯(-n2
  2. 後模擬30M指令後
  3. 結束快進30B指示開始仿真
  4. 在這個例子中使用更快,僅緩存的Nehalem-Lite核心模型(-cnehalem-lite)(通常不使用f或詳細的模擬)
  5. 報告進度(progresstrace.py修改,以顯示每一個指令10B進步,-sprogresstrace

輸出

$ ${SNIPER_ROOT}/run-sniper -n2 -sstop-by-icount:30000000:30000000000 --roi-script -cnehalem-lite -sprogresstrace -- ${TBB_ROOT}/examples/GettingStarted/sub_string_finder/sub_string_finder_extended 

Done building string. 
[STOPBYICOUNT] Starting after 30000000000 instructions 
[STOPBYICOUNT] Then stopping after simulating 30000000 instructions in detail 
Done with serial version. 
[STOPBYICOUNT] Starting ROI after 30000000005 instructions 
[STOPBYICOUNT] Ending ROI after 30000002 instructions (30000000 requested) 
[SNIPER] End 
[SNIPER] Elapsed time: 316.56 seconds 

$ head -n5 sim.out 
            | Core 0  | Core 1  
    Instructions      | 14996162 | 15002407 
    Cycles       | 16365757 | 16365757 
    IPC        |  0.92 |  0.92 
    Time (ns)      | 6152540 | 6152540 

詳細的輸出

$ ${SNIPER_ROOT}/run-sniper -n2 --no-cache-warming -sstop-by-icount:30000000:30000000000 --roi-script -cnehalem-lite -sprogresstrace -- ${TBB_ROOT}/examples/GettingStarted/sub_string_finder/sub_string_finder_extended 
[SNIPER] Start 
[STOPBYICOUNT] Starting after 30000000000 instructions 
[STOPBYICOUNT] Then stopping after simulating 30000000 instructions in detail 
[SNIPER] -------------------------------------------------------------------------------- 
[SNIPER] Sniper using Pin frontend 
[SNIPER] Running in script-driven instrumenation mode (--roi-script) 
[SNIPER] Using FAST_FORWARD mode for warmup 
[SNIPER] Using CACHE_ONLY mode for detailed 
[SNIPER] -------------------------------------------------------------------------------- 
Done building string. 
[PROGRESS] 10000M instructions, 94977 KIPS, 1.00 IPC 
[PROGRESS] 20000M instructions, 95086 KIPS, 1.00 IPC 
Done with serial version. 
[STOPBYICOUNT] Starting ROI after 30000000005 instructions 
[SNIPER] Enabling performance models 
[SNIPER] Setting instrumentation mode to CACHE_ONLY 
[PROGRESS] 30000M instructions, 99674 KIPS, 2.00 IPC 
[STOPBYICOUNT] Ending ROI after 30000002 instructions (30000000 requested) 
[SNIPER] Disabling performance models 
[SNIPER] Leaving ROI after 0.58 seconds 
[SNIPER] Simulated 30.0M instructions, 28843.6M cycles, 0.00 IPC 
[SNIPER] Simulation speed 52057.4 KIPS (26028.7 KIPS/target core - 38.4ns/instr) 
[SNIPER] Sampling: executed 0.00% of simulated time in detailed mode 
[SNIPER] Setting instrumentation mode to FAST_FORWARD 
[SNIPER] End 
[SNIPER] Elapsed time: 316.56 seconds