<?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 Re: Re:Profiling with optimization enabled in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216737#M19486</link>
    <description>&lt;P&gt;Hi Kirill,&lt;/P&gt;
&lt;P&gt;Thank you for looking into this.&lt;/P&gt;
&lt;P&gt;Binaries are attached.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Kenni&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2020 06:54:17 GMT</pubDate>
    <dc:creator>petersen__Kenni_dine</dc:creator>
    <dc:date>2020-10-12T06:54:17Z</dc:date>
    <item>
      <title>Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1214315#M19425</link>
      <description>&lt;P&gt;I have encountered a problem when using VTune to find hotspots in a large program I am developing. It appears that VTune is not capable of properly identifying names of functions comprising hotspots and their associated call stacks when the code is compiled with optimization enabled (e.g. /O2).&lt;/P&gt;
&lt;P&gt;To illustrate the problem, I have generated a simple example:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;omp.h&amp;gt;

double largesum(int Ncores, long long int Nterms, double* result) {
	double sum = 0;
	double time;
	omp_set_num_threads(Ncores);
	time = omp_get_wtime();
#pragma omp parallel for reduction(+ : sum)
	for (long long int i = 1; i &amp;lt;= Nterms; i++) {
		double id=(double)i;
		sum += 1.0 / (id * id);
	}
	time = omp_get_wtime() - time;
	*result = sum;
	return time;
}

int main()
{
	double result, time,Ncores;
	long long int Nterms;
	Ncores = 1;
	Nterms = (long long int)1e8;
	time=largesum(Ncores, Nterms, &amp;amp;result);
	printf("Result: %f\nTime: %f\n", result, time);
}
&lt;/LI-CODE&gt;
&lt;P&gt;I.e. the program calculates the value of large convergent sum with 1e8 terms. The sum is calculated in the function largesum()&lt;/P&gt;
&lt;P&gt;I can first compile the code (using Windows 10. and version 19.0/19.1 of the Intel Compiler) without optimization. E.g:&lt;/P&gt;
&lt;P&gt;icl Speedtestconsole.cpp /Od /Qopenmp /Zi&lt;/P&gt;
&lt;P&gt;When analysing the result in VTune "Hotspots", it can be seen that largesum() is recognized as a CPU-intensive function:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Udklip.PNG" style="width: 701px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/12977i12FE0A639569DBB9/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Udklip.PNG" alt="Udklip.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, compiling the program with optimization:&lt;/P&gt;
&lt;P&gt;icl Speedtestconsole.cpp /O2 /Qopenmp /Zi&lt;/P&gt;
&lt;P&gt;results in this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petersen__Kenni_dine_0-1601635325057.png" style="width: 706px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/12978i312D3DA5D1659563/image-dimensions/706x359/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="706" height="359" role="button" title="petersen__Kenni_dine_0-1601635325057.png" alt="petersen__Kenni_dine_0-1601635325057.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, the function largesum() is never identified.&lt;/P&gt;
&lt;P&gt;I also tried adding more of the recommended compiler settings (/MD, /debug:full or&amp;nbsp;&lt;SPAN class="ph codeph"&gt;/debug:inline-debug-info ), but without any luck. I would really like to be able with optimizations enabled.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Does anybody know what the problem might be?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 10:48:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1214315#M19425</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-02T10:48:08Z</dc:date>
    </item>
    <item>
      <title>Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1214835#M19437</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting in Intel Forum.&lt;/P&gt;&lt;P&gt;We are trying to reproduce the issue from our end. We will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Raeesa&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Oct 2020 12:25:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1214835#M19437</guid>
      <dc:creator>RaeesaM_Intel</dc:creator>
      <dc:date>2020-10-05T12:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1214863#M19438</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;Looks like compiler inlined this function.&lt;/P&gt;
&lt;P&gt;I've added&amp;nbsp;&lt;/P&gt;
&lt;P&gt;__declspec(noinline)&lt;BR /&gt;double largesum(int Ncores, long long int Nterms, double* result) {&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;To your sample and got the stack&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kirill_U_Intel_0-1601906202393.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/13003iA3B2446AEB8317C1/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Kirill_U_Intel_0-1601906202393.png" alt="Kirill_U_Intel_0-1601906202393.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 13:56:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1214863#M19438</guid>
      <dc:creator>Kirill_U_Intel</dc:creator>
      <dc:date>2020-10-05T13:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215483#M19447</link>
      <description>&lt;P&gt;Dear Kirill,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response. This works and makes good sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a more complicated setting, where a program might contain calls to thousands of different functions, what would then be a good profiling approach?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see that it is possible to disable all inlining with&amp;nbsp;&lt;SPAN&gt;/Ob0 (or&amp;nbsp;-fno-inline), and that does enables me to see the workload of individual functions. However, I imagine that inlining could affect performance quite a bit, and that results from profiling with or without inlining would likely be similarly affected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Therefore, I think it would be quite meaningful to somehow be able to see the (virtual) workload of inlined functions. Profiling a program with inling disabled might give a wrong picture of where the workload is located.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does that make sense, or am I asking for something that is simply not possible?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kenni&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 07:40:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215483#M19447</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-07T07:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215515#M19450</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;To stay optimization and get inlines in stacks, I suggest to use&amp;nbsp;&lt;SPAN&gt;/debug:inline-debug-info to generate debug info for inlines.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/analyze-performance/manage-data-views/viewing-data-on-inline-functions.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/analyze-performance/manage-data-views/viewing-data-on-inline-functions.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Kirill&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 09:34:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215515#M19450</guid>
      <dc:creator>Kirill_U_Intel</dc:creator>
      <dc:date>2020-10-07T09:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215541#M19452</link>
      <description>&lt;P&gt;Dear Kirill,&lt;/P&gt;
&lt;P&gt;I gave it a shot, but apparently, I was unable to find the inlined function in Vtune. I used the following compiler command:&lt;/P&gt;
&lt;P&gt;icl Speedtestconsole.cpp /O2 /debug:inline-debug-info /Qopenmp /Zi&lt;/P&gt;
&lt;P&gt;Should, this be done differently?&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Kenni&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 11:30:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215541#M19452</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-07T11:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215547#M19453</link>
      <description>&lt;P&gt;Hm,&amp;nbsp;I used the same 'icl Speedtestconsole.cpp /O2 /Qopenmp /Zi /debug:inline-debug-info'&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kirill_U_Intel_0-1602071840250.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/13034i9E8C94D5C5992B17/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Kirill_U_Intel_0-1602071840250.png" alt="Kirill_U_Intel_0-1602071840250.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 11:57:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215547#M19453</guid>
      <dc:creator>Kirill_U_Intel</dc:creator>
      <dc:date>2020-10-07T11:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215552#M19454</link>
      <description>&lt;P&gt;Strange. I tried to use the exact same compiler command, and Vtune shows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petersen__Kenni_dine_0-1602072750198.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/13035iEFB5360897AB0603/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="petersen__Kenni_dine_0-1602072750198.png" alt="petersen__Kenni_dine_0-1602072750198.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If I invoke the "__declspec(noinline)" directive and use the same compilation option, I do see the function:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="petersen__Kenni_dine_1-1602072869481.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/13036i78C965BEA7BE7689/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="petersen__Kenni_dine_1-1602072869481.png" alt="petersen__Kenni_dine_1-1602072869481.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Vtune version 2019 Update 6.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 12:16:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215552#M19454</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-07T12:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215574#M19455</link>
      <description>&lt;P&gt;Tried the same VTne version, inline was in stack.&lt;/P&gt;
&lt;P&gt;Looks like that depends on compiler.&lt;/P&gt;
&lt;P&gt;what is your compiler version?&lt;/P&gt;
&lt;P&gt;icl on my side&lt;BR /&gt;Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.4.228 Build 20190417&lt;BR /&gt;Copyright (C) 1985-2019 Intel Corporation. All rights reserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 13:45:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1215574#M19455</guid>
      <dc:creator>Kirill_U_Intel</dc:creator>
      <dc:date>2020-10-07T13:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216277#M19473</link>
      <description>&lt;P&gt;Hi Kirill,&lt;/P&gt;
&lt;P&gt;I have tried testing this on two different machines with slightly different machines with different versions:&lt;/P&gt;
&lt;P&gt;#1:&lt;/P&gt;
&lt;P&gt;Intel compiler: 19.1.2.254&lt;/P&gt;
&lt;P&gt;Vtune: 2020 Update 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#2:&lt;/P&gt;
&lt;P&gt;Intel compiler:&amp;nbsp;19.0.5.281&lt;/P&gt;
&lt;P&gt;Vtune: 2019 Update 6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In both cases, I was unable to see the inlined function with the suggested compiler/linker settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Kenni&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 15:17:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216277#M19473</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-09T15:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216728#M19485</link>
      <description>&lt;P&gt;Hi, Kenni.&lt;/P&gt;
&lt;P&gt;Could you attach your binaries (exe + pdb)? I'll try on my side.&lt;/P&gt;
&lt;P&gt;Thanks, Kirill&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 06:21:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216728#M19485</guid>
      <dc:creator>Kirill_U_Intel</dc:creator>
      <dc:date>2020-10-12T06:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216737#M19486</link>
      <description>&lt;P&gt;Hi Kirill,&lt;/P&gt;
&lt;P&gt;Thank you for looking into this.&lt;/P&gt;
&lt;P&gt;Binaries are attached.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Kenni&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 06:54:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216737#M19486</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-12T06:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216789#M19488</link>
      <description>&lt;P&gt;The difference is in VS version.&lt;/P&gt;
&lt;P&gt;Tried VS12 and VS14.&lt;/P&gt;
&lt;P&gt;Looks like VS14 linker does not save debug info for inlines and stack is without largesum.&lt;/P&gt;
&lt;P&gt;Kirill&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 09:11:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216789#M19488</guid>
      <dc:creator>Kirill_U_Intel</dc:creator>
      <dc:date>2020-10-12T09:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216803#M19489</link>
      <description>&lt;P&gt;/debug:inline-debug-info option is deprecated; it is only&amp;nbsp;valuable&amp;nbsp;with&amp;nbsp;old versions of Visual Studio and Intel&amp;nbsp;Compiler.&amp;nbsp;The debugging information generated for inline functions&amp;nbsp;by modern versions of VS and Intel Compilers is not supported by VTune.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BTW,&amp;nbsp;largesum&amp;nbsp;is not a CPU-intensive function in this sample; It has 0 CPU Time (see the CPU Time:Self column); most of the work is done in the OpenMP parallel region.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 11:19:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216803#M19489</guid>
      <dc:creator>Denis_M_Intel</dc:creator>
      <dc:date>2020-10-12T11:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216817#M19490</link>
      <description>&lt;P&gt;Thanks Kirill,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That makes sense. I did not realize until now that the command-line I invoke from the shortcut built by the Intel Parallel Studio sets up the compiler environment to use the VS linker.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since my original problem (and not the small example considered here), involves a Windows application that I develop using VS, I suppose I will have to wait and see if outputting inline-debug-information is something MS decides to fix at some point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But thank you very much. I still learned a lot &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Kenni&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:58:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216817#M19490</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-12T10:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216823#M19491</link>
      <description>&lt;P&gt;Hi Denis,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ok, thank you for pointing that out. Is there some other recommended approach than using VTune then?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the function being CPU-intensive: Right, it is not in the presented version, but increase Nterms to, say, (long long int)1e10 or even higher, and it should start to be CPU-intensive, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, I just tried to run with 1e11 terms in the sum and got this result:&lt;/P&gt;
&lt;DIV id="tinyMceEditorpetersen__Kenni_dine_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorpetersen__Kenni_dine_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unavngivet.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/13116i044CB38E31AD2452/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Unavngivet.png" alt="Unavngivet.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is interesting that the type cast is so CPU-intensive compared to the sum-increment line which both involves an addition, a division and a multiplication. However, when optimization is disabled, most of the workload is indeed in the sum-increment-line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 11:27:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1216823#M19491</guid>
      <dc:creator>petersen__Kenni_dine</dc:creator>
      <dc:date>2020-10-12T11:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1217095#M19495</link>
      <description>&lt;P&gt;I think there will be a separate internal function created for the OpenMP loop:&amp;nbsp;&lt;A href="mailto:largesum$omp$parallel_for@10" target="_blank"&gt;largesum$omp$parallel_for&lt;/A&gt; and most of CPU time will be attributed to it. Increasing Nterms&amp;nbsp;shouldn't affect largesum because the loop with all computations will be moved to &amp;nbsp;&lt;A href="mailto:largesum$omp$parallel_for@10" target="_blank"&gt;largesum$omp$parallel_for&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 07:40:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1217095#M19495</guid>
      <dc:creator>Denis_M_Intel</dc:creator>
      <dc:date>2020-10-13T07:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1217528#M19509</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt;It is interesting that the type cast is so CPU-intensive compared to the sum-increment line which both involves an addition, a division and a multiplication. However, when optimization is disabled, most of the workload is indeed in the sum-increment-line.&amp;gt;&amp;gt;&amp;gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You should look at ICC generated assembly for those two optimization levels. For such a high number of loop trip count (1e11) the convergence of precision in sampling mode should be good and you can look at assembly and see which lines of machine code were marked as&amp;nbsp; hotspot "contributors".&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 07:53:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1217528#M19509</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2020-10-14T07:53:52Z</dc:date>
    </item>
    <item>
      <title>Re:Profiling with optimization enabled</title>
      <link>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1219637#M19539</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad that your issue got resolved. We are discontinuing monitoring this thread. Please raise a new thread if you have any further queries.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Raeesa&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2020 04:29:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Profiling-with-optimization-enabled/m-p/1219637#M19539</guid>
      <dc:creator>RaeesaM_Intel</dc:creator>
      <dc:date>2020-10-21T04:29:53Z</dc:date>
    </item>
  </channel>
</rss>

