Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jaj2276
Beginner
48 Views

Command-line resume option not valid for core2 event-based collections

[bash]
We want the ability to start profiling after X number of seconds while starting the profile from the command line. We can currently achieve this on the algorithmic-based collections (i.e. hotspots, concurrency, locks and waits) by passing in: -resume-after 60000 as an option to amplxe-cl However, whenever we run --collect core2_cycles-uops, it will not run if -resume-after 60000 is included. Is there a way to get these types of collections to only start after some period of time? // Works amplxe-cl --collect concurrency -follow-child -target-duration-type=short -no-allow-multiple-runs -no-analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 -resume-after 60000 --duration 300 -- /home/q/kewpie/current/bin/kewpie --app_instance=1 // Does not work amplxe-cl --collect core2_cycles-uops -follow-child -target-duration-type=short -no-allow-multiple-runs -no-analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 -resume-after 60000 --duration 300 -- /home/q/kewpie/current/bin/kewpie --app_instance=1 Unknown option: --resume-after Sampling collector options are incorrect; collection cannot continue. Please try again. // Works (notice we just removed the -resume-after 60000) amplxe-cl --collect core2_cycles-uops -follow-child -target-duration-type=short -no-allow-multiple-runs -no-analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 --duration 300 -- /home/q/kewpie/current/bin/kewpie --app_instance=1 [/bash]
0 Kudos
6 Replies
Peter_W_Intel
Employee
48 Views

I can repeat this problem with example from VTune Amplifier XE 2011.

[root@kentsfield-01 src]# cd /opt/intel/vtune_amplifier_xe_2011/samples/en/
[root@kentsfield-01 en]# ls
tachyon_vtune_amp_xe.tar.gz
[root@kentsfield-01 en]# tar xzf tachyon_vtune_amp_xe.tar.gz
[root@kentsfield-01 en]# make
tbbforexamples/2.2/set_tbb_symlinks.sh
check_for_valid_platform
....

amplxe-cl -collect concurrency -resume-after 5000 -duration 30 -- ./tachyon_analyze_locks
It works!

amplxe-cl -collect core2_cycles-uops -resume-after 5000 -duration 30 -- ./tachyon_analyze_locks
It reported, "Unknown option: --resume-after", "Sampling collector option are incorrect"

I will submit this problem to engineering team, and re-post the solution on this thread. Thanks for your valuable report.

Regards, Peter
Mark_D_Intel
Employee
48 Views

The -resume-after option is unfortunately not working with any of the analysis types based on hardware event sampling.

A workaround is to use the -start-paused option, and then run amplxe-cl with the '-command resume' option after the desired delay.

The sequence of commands as a bash script:

#!/bin/sh

amplxe-cl -collect core2_cycles-uops -start-paused &
sleep 60
amplxe-cl -command resume
wait
Peter_W_Intel
Employee
48 Views

Thanks Mark!

Another workaround is to start data collection in pause mode; Insert Pause/Resume API in users code, see this article.

The user has to use "-duration xxx" in , since there is no Stop API which can be inserted in users code.
Peter_W_Intel
Employee
48 Views

However supporting option "-resume-after" for PMU event based sampling still is a new feature request for the product.
zamin78
Beginner
48 Views

Hi Mark,

I've tried the amplxe-cl -command resume but returning this message:

Fatal error: Cannot detect running collection to deliver command.


What I've did is:

#!/bin/bash

amplxe-cl -collect=locksandwaits -start-paused &
sleep 60
amplxe-cl -command resume
wait

Is there any way I could decide when to start the sampling and when to stop? I prefer not using user-controlcode APIs.

Thanks,
Dongwon

Peter_W_Intel
Employee
48 Views

Since "resume-after" option can work on user-modedata collections (hotspots, concurrency, locksandwaits), there is no necessary to use "start-pause" in command line.

Here is example and its output from my side:
=====================================================================
[root@NHM02 ~]# amplxe-cl -collect lightweight-hotspots -start-pause -duration 60 &
[1] 19989
[root@NHM02 ~]# amplxe-cl -command resume &
[2] 20025
[root@NHM02 ~]# Sampling successfully resumed.
1> The sampling collection paused.

1> The sampling collection resumed.
1>

Using result path `/root/r014lh'
Executing actions 75 % Generating a report

Summary
-------

Elapsed Time: 44.669
Executing actions 100 % done

[1]- Done amplxe-cl -collect lightweight-hotspots -start-pause -duration 60
[2]+ Done amplxe-cl -command resume
=================================================================

By the way, if you don'tuse APIs in code to control, so you use sleep to know whento start and use duration to know when to stop.

Regards, Peter

Reply