Vtune how to use?

本文详细介绍了Intel VTune Amplifier的amplxe-cl命令语法及其可用操作,包括收集、报告、帮助等具体用法,并提供了实际示例来演示如何进行热区收集和报告生成。
 Usage: amplxe-cl <-action> [-action-option] [-global-option] [[--] target [target options]]
 
 To view the results in the IDE, double-click the <resultname>.amplxe
 file located in the result directory.
 
 Type 'amplxe-cl -help <action>' for help on a specific action.
 

Available Actions:
 
    collect
    collect-with
    command
    finalize
    help
    import
    report
    version


Examples:
 

 1) Perform the hotspots collection on the given target.
 
    amplxe-cl -collect hotspots a.out
 
 2) Generate the 'hotspots' report for the result directory 'r000hs'.
 
    amplxe-cl -report hotspots -r r000hs
 
 3) Display help for the collect action.
 

    amplxe-cl -help collect



About amplxe-cl Command Syntax

Use the following Intel(R) VTune(TM) Amplifier XE amplxe-clcommand syntax:

amplxe-cl <action> [action-option] [global-option] [[--] <target> [target-options]]

where:

  • <action> is the action the Intel(R) VTune(TM) Amplifier XE performs, for example: collect data or generate a performance report.

  • [action-option] is a command line option defining a behavior applicable to the specific action. You may have multiple action options per action. Using anaction option that does not apply to the action results in a usageerror.

  • [global-option] is a command line option defining a behavior applicable to all actions. You may have multiple global options per action.

  • <target> is the application to analyze.

  • [target options] are the options of the analyzed application.

Example

This example runs the Hotspots analysis for the sample target located at the home/test/ directory, saves the analysis result in the r001hs subdirectory of the current directory, and displays the default summary report.

$ amplxe-cl -collect hotspots -result-dir r001hs home/test/sample -quiet

where:

  • -collect is an action

  • hotspots is an argument of action option

  • -result-dir is an action option

  • r001hs is an argument of action option

  • sample is a target

  • -quiet is a global option


VTune是一款性能调优工具,可以用于优化串行和并行程序的性能。对于MPI程序的性能优化,VTune提供了一些采集和分析方法。 1. 准备工作 在使用VTune进行MPI程序分析之前,需要确保每个MPI进程都已启动VTune Amplifier。可以使用vtune_amplifier_xe或mpiexec工具来启动MPI进程,启动命令如下: mpiexec -n <nprocs> -env VTUNE_PROFILER_ON true -env VTUNE_PROFILER_BUFFER_SIZE <buf_size> vtune_amplifier_xe –collect <analysis type> --result-dir <directory> 其中,nprocs指定进程数量,VTUNE_PROFILER_ON指定启用VTune Amplifier,VTUNE_PROFILER_BUFFER_SIZE指定VTune Amplifier缓冲区大小,analysis type指定采集分析类型,directory指定结果文件夹路径。 2. 采集数据 在MPI程序执行时,VTune Amplifier会采集每个进程的性能数据,并将其保存到分析类型所对应的结果文件中。采集的数据包括CPU使用情况、内存使用情况、函数调用次数和耗时、线程互斥等信息。 3. 进行Top-down分析 Top-down分析是一种层次性的性能分析方法,它将程序性能分解成各层次的函数调用组合,分析函数调用的耗时和瓶颈,从而找出程序性能的主要瓶颈。使用VTune Amplifier进行Top-down分析可以参考以下步骤: Step1:选择分析类型 在VTune Amplifier中,选择“VTune Performance Analyzer”选项卡,然后选择“Top-down Micro-architecture Analysis (Survey)”分析类型,点击“Start Analysis”按钮开始采集数据。 Step2:设置采样间隔 在分析选项卡中,设置采样间隔,以便采集足够的数据。间隔时间越小,采样数据越详细,但是分析时间越长。通常可以选择1ms的采样间隔。 Step3:分析结果 分析完成后,VTune Amplifier会生成一个Top-down分析结果报告,其中包括每个进程的热点函数、函数耗时、函数调用关系图等信息。根据该报告可以确定程序的性能瓶颈和优化方向。 总的来说,采集MPI程序的方法与普通程序类似,只需要在启动命令中加入VTune Profiler的环境变量即可。对于Top-down分析,需要选择合适的分析类型,并设置采样间隔,分析结果可以直观地展示出程序的性能瓶颈,方便优化。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值