2017-08-24 147 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