<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Sampling API Error: resume sampling collection failed. in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777620#M583</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;currently I am struggeling with the error as mentioned above.&lt;BR /&gt;&lt;BR /&gt;One of our programmers made the effort to include performance analysis into our framework to perform a hotspotanalysis (VTune Amplifier XE Upd. 8), what is working quite nicely. But when I change the hotspotanalysis to a user defined hw event counting like this:&lt;BR /&gt;&lt;BR /&gt;$AMPLXECMD -collect-with runsa -knob event-config="$HWEVENTS" -start-paused -follow-child \\&lt;BR /&gt; -target-duration-type=medium -no-allow-multiple-runs -no-analyze-system \\&lt;BR /&gt; -data-limit=500 -slow-frames-threshold=40 -fast-frames-threshold=100 \\&lt;BR /&gt; -r=$OUTPUTDIR/r@@@ -- $APPLICATION&lt;BR /&gt;&lt;BR /&gt;Then I recieve the error message. Reducing the command did not show any improvements. The ide is to profile specific algorithms that appear in VTune then as tasks. If an algorithm is started there is a before hook asking for some customized code, where we put:&lt;BR /&gt;&lt;BR /&gt;taskId = __itt_event_create(typeName.c_str(), typeName.size());&lt;BR /&gt;__itt_event_start(state.event);&lt;BR /&gt;&lt;BR /&gt;and if started:&lt;BR /&gt;&lt;BR /&gt;__itt_event_end(state.parent_event);&lt;BR /&gt;&lt;BR /&gt;just before the start and so on. Between algorithms the profiling is paused and then resumed. Means it will be called with high frequency. Is this a problem? How could I fix it?&lt;BR /&gt;&lt;BR /&gt;After browsing through the web, I did not found any solution. Has somebody any idea?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Stefan</description>
    <pubDate>Fri, 27 Jul 2012 10:08:40 GMT</pubDate>
    <dc:creator>slohn</dc:creator>
    <dc:date>2012-07-27T10:08:40Z</dc:date>
    <item>
      <title>Sampling API Error: resume sampling collection failed.</title>
      <link>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777620#M583</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;currently I am struggeling with the error as mentioned above.&lt;BR /&gt;&lt;BR /&gt;One of our programmers made the effort to include performance analysis into our framework to perform a hotspotanalysis (VTune Amplifier XE Upd. 8), what is working quite nicely. But when I change the hotspotanalysis to a user defined hw event counting like this:&lt;BR /&gt;&lt;BR /&gt;$AMPLXECMD -collect-with runsa -knob event-config="$HWEVENTS" -start-paused -follow-child \\&lt;BR /&gt; -target-duration-type=medium -no-allow-multiple-runs -no-analyze-system \\&lt;BR /&gt; -data-limit=500 -slow-frames-threshold=40 -fast-frames-threshold=100 \\&lt;BR /&gt; -r=$OUTPUTDIR/r@@@ -- $APPLICATION&lt;BR /&gt;&lt;BR /&gt;Then I recieve the error message. Reducing the command did not show any improvements. The ide is to profile specific algorithms that appear in VTune then as tasks. If an algorithm is started there is a before hook asking for some customized code, where we put:&lt;BR /&gt;&lt;BR /&gt;taskId = __itt_event_create(typeName.c_str(), typeName.size());&lt;BR /&gt;__itt_event_start(state.event);&lt;BR /&gt;&lt;BR /&gt;and if started:&lt;BR /&gt;&lt;BR /&gt;__itt_event_end(state.parent_event);&lt;BR /&gt;&lt;BR /&gt;just before the start and so on. Between algorithms the profiling is paused and then resumed. Means it will be called with high frequency. Is this a problem? How could I fix it?&lt;BR /&gt;&lt;BR /&gt;After browsing through the web, I did not found any solution. Has somebody any idea?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Stefan</description>
      <pubDate>Fri, 27 Jul 2012 10:08:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777620#M583</guid>
      <dc:creator>slohn</dc:creator>
      <dc:date>2012-07-27T10:08:40Z</dc:date>
    </item>
    <item>
      <title>Sampling API Error: resume sampling collection failed.</title>
      <link>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777621#M584</link>
      <description>I don't know why did you use pause mode, did you resume sampling in code?&lt;BR /&gt;&lt;BR /&gt;Secondary, event start/end is only marked in timeline report. And it's for user-mode sampling (Hotspots, Concurrency Analysis, LocksAndWaits Analysis), NOT for PMU event-based sampling.&lt;BR /&gt;&lt;BR /&gt;Here I gave you a simple example - matrix1.c&lt;BR /&gt;[cpp]#include &lt;STDIO.H&gt;
#include &lt;TIME.H&gt;
#include &lt;MALLOC.H&gt;

#include "ittnotify.h"

#define NUM 512

double a[NUM][NUM], b[NUM][NUM], c[NUM][NUM];

__itt_event event_matrix;

void multiply()
{
 unsigned int i,j,k;

    __itt_event_start(event_matrix);

    for(i=0;i&lt;NUM&gt;&lt;J&gt; = 0.0;
          for(k=0;k&lt;NUM&gt;&lt;J&gt; += a&lt;I&gt;&lt;K&gt;*b&lt;K&gt;&lt;J&gt;;
          }

       }
     }

     __itt_event_end(event_matrix);
}


main()
{
 clock_t start, stop;

 event_matrix = __itt_event_create ("Mark matrix event", 17);

 //start timing the matrix multiply code
 start = clock();
 multiply();
 stop = clock();

// print elapsed time
 printf("Elapsed time = %lf secondsn",
      ((double)(stop - start)) / CLOCKS_PER_SEC);

}
[/cpp]&lt;BR /&gt;&lt;BR /&gt;gcc -g matrix1.c -I/opt/intel/vtune_amplifier_xe_2011/include /opt/intel/vtune_amplifier_xe_2011/lib64/libittnotify.a -lpthread -ldl -o matrix1&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;# amplxe-cl -collect hotspots -- ./matrix1&lt;BR /&gt;Elapsed time = 0.740000 seconds&lt;BR /&gt;Using result path `/home/peter/problem_report/r001hs'&lt;BR /&gt;Executing actions 75 % Generating a report &lt;BR /&gt;Summary&lt;BR /&gt;-------&lt;/P&gt;&lt;P&gt;Elapsed Time: 0.761&lt;BR /&gt;CPU Time: 0.750&lt;BR /&gt;Executing actions 100 % done &lt;BR /&gt;&lt;BR /&gt;Open result from amplxe-gui, note "User Task" mark in timeline report&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.intel.com/skins/images/7B13F55A7CE623EF42E69096FA81A3A1/2021_redesign/images/image_not_found.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/J&gt;&lt;/K&gt;&lt;/K&gt;&lt;/I&gt;&lt;/J&gt;&lt;/NUM&gt;&lt;/J&gt;&lt;/NUM&gt;&lt;/MALLOC.H&gt;&lt;/TIME.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Mon, 30 Jul 2012 08:38:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777621#M584</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-07-30T08:38:47Z</dc:date>
    </item>
    <item>
      <title>Sampling API Error: resume sampling collection failed.</title>
      <link>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777622#M585</link>
      <description>Thanks,&lt;BR /&gt;&lt;BR /&gt;I think this clarifies why it is not running.&lt;BR /&gt;&lt;BR /&gt;The only point is, that using tasks gives me another possibility to group processing time, right? But if I use frames, I can do the same and user event sampling is covered as well, isn't it? So where is the difference between events and frames?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Stefan</description>
      <pubDate>Tue, 31 Jul 2012 11:02:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777622#M585</guid>
      <dc:creator>slohn</dc:creator>
      <dc:date>2012-07-31T11:02:11Z</dc:date>
    </item>
    <item>
      <title>Sampling API Error: resume sampling collection failed.</title>
      <link>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777623#M586</link>
      <description>Using __itt_frame is another approach when you do same (similar) works in a loop, so all performance dataare classifiedin eachiteration, please see this &lt;A href="http://software.intel.com/en-us/articles/use-_itt_frame_-apis-from-intel-vtune-amplifier-2011-xe-to-analyze-each-frame-in-critical-code-area/"&gt;article&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;__itt_event provides APIstomark"event star/end"in timeline report, whereyou runcritical code. Usually use "zoom-in/filter on selection", tofocus on this time range to review result.&lt;BR /&gt;&lt;BR /&gt;Regards, Peter</description>
      <pubDate>Wed, 01 Aug 2012 03:16:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Sampling-API-Error-resume-sampling-collection-failed/m-p/777623#M586</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-08-01T03:16:44Z</dc:date>
    </item>
  </channel>
</rss>

