<?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 Problem Assigning Values to Array / Related to OpenMP in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189841#M150391</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I am using Intel Fortran for Windows.&lt;/P&gt;
&lt;P&gt;The array dist_x_hist is declared as&lt;/P&gt;
&lt;P&gt;integer, parameter :: DOUBLE = SELECTED_REAL_KIND(p=8)&lt;BR /&gt;real(KIND=DOUBLE) dist_x_hist(10000,1)&lt;/P&gt;
&lt;P&gt;I then have a simple assignment statement:&lt;/P&gt;
&lt;P&gt;dist_x_hist = 999&lt;/P&gt;
&lt;P&gt;After this simple assignment line, dist_x_hist just displays garbage.&lt;/P&gt;
&lt;P&gt;This happens when I compile using Qopenmp.&lt;/P&gt;
&lt;P&gt;However, if I compile with Qopenmp_stubs, all works well.&lt;/P&gt;
&lt;P&gt;Note that the assignment above occurs before any openmp parallelization.&lt;/P&gt;
&lt;P&gt;Any suggestions of what I should be looking into?&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;BR /&gt;Rafael&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 11:17:14 GMT</pubDate>
    <dc:creator>Dix_Carneiro__Rafael</dc:creator>
    <dc:date>2020-07-06T11:17:14Z</dc:date>
    <item>
      <title>Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189841#M150391</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I am using Intel Fortran for Windows.&lt;/P&gt;
&lt;P&gt;The array dist_x_hist is declared as&lt;/P&gt;
&lt;P&gt;integer, parameter :: DOUBLE = SELECTED_REAL_KIND(p=8)&lt;BR /&gt;real(KIND=DOUBLE) dist_x_hist(10000,1)&lt;/P&gt;
&lt;P&gt;I then have a simple assignment statement:&lt;/P&gt;
&lt;P&gt;dist_x_hist = 999&lt;/P&gt;
&lt;P&gt;After this simple assignment line, dist_x_hist just displays garbage.&lt;/P&gt;
&lt;P&gt;This happens when I compile using Qopenmp.&lt;/P&gt;
&lt;P&gt;However, if I compile with Qopenmp_stubs, all works well.&lt;/P&gt;
&lt;P&gt;Note that the assignment above occurs before any openmp parallelization.&lt;/P&gt;
&lt;P&gt;Any suggestions of what I should be looking into?&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;BR /&gt;Rafael&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 11:17:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189841#M150391</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-06T11:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189878#M150393</link>
      <description>&lt;P&gt;Ar you examining the array from outside or inside a parallel region (declared in scope of the array declaration)?&lt;/P&gt;
&lt;P&gt;Which version of Intel Visual Fortran?&lt;BR /&gt;Which version of Microsoft Visual Studio?&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 13:44:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189878#M150393</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2020-07-06T13:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189885#M150394</link>
      <description>&lt;P&gt;Thank you Jim.&lt;/P&gt;
&lt;P&gt;I am using version 15.8.5 of Microsoft Visual Studio Professional 2017 and Intel Parallel Studio XE 2019 Update 5 Composer Edition for Windows.&lt;/P&gt;
&lt;P&gt;The array is examined outside of a parallel region.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 14:32:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189885#M150394</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-06T14:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189987#M150402</link>
      <description>&lt;P&gt;Can you upload a complete code to replicate it. It might reveal more since what you posted would surely have caused others grief by now if that was all that was involved&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 19:52:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189987#M150402</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2020-07-06T19:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189994#M150404</link>
      <description>&lt;P&gt;Sure, how do I do that?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 20:18:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1189994#M150404</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-06T20:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190000#M150406</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;Sure, how do I do that?&lt;/P&gt;
&lt;P&gt;Place the content of your program in the clipboard, then reply to this thread and on the Body Toolbar us the &amp;lt;/&amp;gt; button which pops-up an additional edit box for you to Paste you code into. An alternative is below the main Body edit box is a dashed line box labeled&lt;EM&gt; Drag and drop here or browse files to attach&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;When the file is relatively short, use the &amp;lt;/&amp;gt; button as it is easier to comment on code seen as opposed to code unseen.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 20:37:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190000#M150406</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2020-07-06T20:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190008#M150407</link>
      <description>&lt;P&gt;it's a large program, with many modules.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 20:57:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190008#M150407</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-06T20:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190010#M150408</link>
      <description>&lt;P&gt;sorry, I read too quickly. I will upload a zip file later today. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 20:59:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190010#M150408</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-06T20:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190067#M150415</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;I am attaching the codes. The Visual Studio and Intel Fortran versions are specified earlier in this thread.&lt;/P&gt;
&lt;P&gt;I noticed the problem in file InnerLoop_MOD.f90, in Debug mode.&lt;/P&gt;
&lt;P&gt;Line 206:&amp;nbsp;dist_w_hist = 999.0 -- dist_w_hist is not being assigned that value&lt;/P&gt;
&lt;P&gt;Line 312:&amp;nbsp;dist_x_hist = 999 -- dist_x_hist is not being assigned that value&lt;/P&gt;
&lt;P&gt;This problem only happens if I debug with Qopenmp. With Qopenmp_stubs it works fine.&lt;/P&gt;
&lt;P&gt;Here is the Fortran command line:&lt;BR /&gt;/nologo /debug:full /Od /heap-arrays0 /Qopenmp /warn:all /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc150.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /Qmkl:sequential /c&lt;/P&gt;
&lt;P&gt;For the linker:&lt;BR /&gt;/OUT:"Debug\Project_Transition_Bonds.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"Debug\Project_Transition_Bonds.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\rd699\Dropbox\TradeDeficitsLabor\Fortran\Project_Transition_Bonds\Project_Transition_Bonds\Debug\Project_Transition_Bonds.pdb" /SUBSYSTEM:CONSOLE /STACK:10000000 /IMPLIB:"C:\Users\rd699\Dropbox\TradeDeficitsLabor\Fortran\Project_Transition_Bonds\Project_Transition_Bonds\Debug\Project_Transition_Bonds.lib"&lt;/P&gt;
&lt;P&gt;Let me know if you can reproduce the problem.&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;BR /&gt;Rafael&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 01:27:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190067#M150415</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-07T01:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190154#M150416</link>
      <description>&lt;P&gt;I was hoping for a cut down piece of code. But if we are to compile the whole thing, we will need the file with module SteadyStateEQ_MOD.&lt;/P&gt;
&lt;P&gt;If the debugger shows unexpected values like this, I would always double check its not misleeding us. Print to the console.&lt;/P&gt;
&lt;P&gt;print *, dist_w_hist (:4,1)&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 07:28:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190154#M150416</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2020-07-07T07:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190205#M150418</link>
      <description>&lt;P&gt;My apologies, I included one additional fortran file that did not belong to the project. I am uploading the right set of files now -- I double checked it compiles well (please put the csv files and remaining folders in the same folder as the executable) before running the code. The program takes a few seconds to get to the point I mentioned.&lt;/P&gt;
&lt;P&gt;Interestingly, I did what you suggested and printed the array to screen. It does print correctly. What should I conclude from this?&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 10:49:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190205#M150418</guid>
      <dc:creator>Dix_Carneiro__Rafael</dc:creator>
      <dc:date>2020-07-07T10:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190360#M150421</link>
      <description>&lt;P&gt;Unfortunately, issues with the Intel debugger displaying wrong contents of variables one day and correct the next have been around over many versions. But I have not seen it happen in a simple array like this before, only in arrays declared as derived type components.&lt;/P&gt;
&lt;P&gt;It would be good to submist a support requiest for this issue.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 19:19:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190360#M150421</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2020-07-07T19:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190368#M150422</link>
      <description>&lt;P&gt;I was able to replicate your issue when compiled for 32 bit:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andrew_Smith_0-1594150172343.png" style="width: 547px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/11072iAF06D1161BD53CA4/image-dimensions/547x685/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="547" height="685" role="button" title="Andrew_Smith_0-1594150172343.png" alt="Andrew_Smith_0-1594150172343.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When compiled for 64 bit i get another and probably related debugger error:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andrew_Smith_1-1594150436425.png" style="width: 549px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/11073i408B1FD38E2575C7/image-dimensions/549x744/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="549" height="744" role="button" title="Andrew_Smith_1-1594150436425.png" alt="Andrew_Smith_1-1594150436425.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 19:35:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190368#M150422</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2020-07-07T19:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Assigning Values to Array / Related to OpenMP</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190663#M150435</link>
      <description>&lt;P&gt;One thing that (speculatively) could be a problem is that dist_w_hist(maxiter_w,1), with maxiter_w being a parameter, is that the compiler may have elided (removed) the need for an array descriptor, and therefore the Debugger has no array descriptor to use.&lt;/P&gt;
&lt;P&gt;As an experiment, make the arrays dist_w_vec and dist_w_hist allocatable (place with w_tilde(:,:,:), ...) and allocate/deallocate with the other allocatables.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 13:46:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-Assigning-Values-to-Array-Related-to-OpenMP/m-p/1190663#M150435</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2020-07-08T13:46:54Z</dc:date>
    </item>
  </channel>
</rss>

