<?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 Zoltan, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983374#M26572</link>
    <description>&lt;P&gt;Zoltan,&lt;/P&gt;

&lt;P&gt;RE Kevin's: &lt;EM&gt;I do not know whether any of these is usable in your original code, but for the test case, using either an allocatable array, or adding SAVE, or using other means to force array C into static storage with &lt;STRONG&gt;-openmp&lt;/STRONG&gt; avoids the incorrect results.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;You can also use AUTOMATIC, an&amp;nbsp;Intel specific attribute, though -openmp should (will) make local arrays on stack, and may be redundant for the purpose of allocation, but may have the side effect of fixing the compiler bug. Note, for large single instance arrays you can also use ALLOCATABLE, SAVE (places the descriptor in save area).&lt;/P&gt;

&lt;P&gt;Be aware that when multiple host OpenMP threads enter an offload to the same MIC, that this is somewhat equivalent to nested parallel regions. There is nothing wrong with doing this provided each host-to-MIC entry is programmed to use a subset of the available threads on the MIC. Failure to do so may yield unacceptable results.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
    <pubDate>Sat, 19 Apr 2014 12:42:54 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2014-04-19T12:42:54Z</dc:date>
    <item>
      <title>Offload compilation problem with -openmp option.</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983369#M26567</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;

&lt;P&gt;I have problems using openmp and offload directives. The following (reduced) code give right result (1 &amp;nbsp;2 &amp;nbsp;3 &amp;nbsp;4 &amp;nbsp;5 &amp;nbsp;0 &amp;nbsp;0 &amp;nbsp;0 &amp;nbsp;0 &amp;nbsp;0), when it's compiled without openmp ("ifort test.f -o test"), and wrong (1 &amp;nbsp;2 &amp;nbsp;3 &amp;nbsp;4 &amp;nbsp;5 &amp;nbsp;6 &amp;nbsp;7 &amp;nbsp;8 &amp;nbsp;9 10)&amp;nbsp;&lt;SPAN dir="auto"&gt;with &lt;/SPAN&gt;openmp ("ifort -openmp test.f -o test")&lt;SPAN dir="auto"&gt;.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;      PROGRAM test
      integer c(10)

      c=0

!DIR$ OFFLOAD_TRANSFER target(mic:0)
     &amp;amp; nocopy(c: length(10) alloc_if(.true.) free_if(.false.))

!DIR$ OFFLOAD begin target(mic:0) nocopy(c)
      do i=1,10
      c(i)=i
      enddo
!DIR$ end OFFLOAD

!DIR$ OFFLOAD_TRANSFER target(mic:0)
     &amp;amp; out(c(1:5): alloc_if(.false.) free_if(.false.) into(c(1:5)))

!DIR$ OFFLOAD_TRANSFER target(mic:0)
     &amp;amp; nocopy(c: alloc_if(.false.) free_if(.true.))

      WRITE(*,'(10(1X,I2))'), c

      END PROGRAM
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;"OFFLOAD_REPORT" when &lt;/SPAN&gt;result is wrong: (not full)&lt;/P&gt;

&lt;P&gt;[Offload] [MIC 0] [File] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test.f&lt;BR /&gt;
	[Offload] [MIC 0] [Line] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&lt;BR /&gt;
	[Offload] [MIC 0] [Tag] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag 1&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Start Offload&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Initialize function __offload_entry_test_f_9MAIN__ifort1104196052Lk2WXB&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Send pointer data&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; CPU-&amp;gt;MIC pointer data 0&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Gather copyin data&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; CPU-&amp;gt;MIC copyin data 0&amp;nbsp;&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Compute task on MIC&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Receive pointer data&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; MIC-&amp;gt;CPU pointer data 0&lt;BR /&gt;
	[Offload] [MIC 0] [Tag 1] [State] &amp;nbsp; Start target function __offload_entry_test_f_9MAIN__ifort1104196052Lk2WXB&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [State] &amp;nbsp; Scatter copyout data&lt;BR /&gt;
	[Offload] [HOST] &amp;nbsp;[Tag 1] [CPU Time] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.001025(seconds)&lt;BR /&gt;
	[Offload] [MIC 0] [Tag 1] [CPU-&amp;gt;MIC Data] &amp;nbsp; 0 (bytes)&lt;BR /&gt;
	[Offload] [MIC 0] [Tag 1] [MIC Time] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.000210(seconds)&lt;BR /&gt;
	[Offload] [MIC 0] [Tag 1] [MIC-&amp;gt;CPU Data] &amp;nbsp; 40 (bytes)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Offload region at line 9 do data transfer, when nocopy is set...&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;composer xe 2013 sp1.2.144;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;ifort version 14.0.2)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;(This is a reduced code, which reproduce the error. My full code contain openmp directives.&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 11:58:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983369#M26567</guid>
      <dc:creator>Zoltan_P_</dc:creator>
      <dc:date>2014-04-18T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Can you include the OpenMP</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983370#M26568</link>
      <description>&lt;P&gt;Can you include the OpenMP directives in your simple example.&lt;/P&gt;

&lt;P&gt;In particular, is your parallel region between lines 5 and 20 or within the 2nd offload as a parallel do?&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 12:38:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983370#M26568</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-04-18T12:38:59Z</dc:date>
    </item>
    <item>
      <title>Thank you for the convenient</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983371#M26569</link>
      <description>Thank you for the convenient reproducer; I confirmed the failure. This appears to be fixed in the next major release, planned for later this year (and beta starting soon); however, it still fails with the upcoming update (later this month) to the CXE 2013 SP1 you currently have.

I am also unable to find a work around but will inquire w/our Developers to see whether something exists.</description>
      <pubDate>Fri, 18 Apr 2014 12:47:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983371#M26569</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-04-18T12:47:56Z</dc:date>
    </item>
    <item>
      <title>I submitted the issue to</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983372#M26570</link>
      <description>&lt;P&gt;I submitted the issue to Development (see internal tracking id below) to determine whether a fix is possible for the CXE 2013 SP1 (14.0 compiler) release.&lt;/P&gt;

&lt;P&gt;I do not know whether any of these is usable in your original code, but for the test case, using either an allocatable array, or adding SAVE, or using other means to force array C into static storage with &lt;STRONG&gt;-openmp&lt;/STRONG&gt; avoids the incorrect results.&lt;/P&gt;

&lt;P&gt;If you are interested, the Beta program has been announced here: &lt;A href="https://software.intel.com/en-us/forums/topic/509633" target="_blank"&gt;&lt;STRONG&gt;Invitation to join the Intel® Software Development Tools 2015 Beta program&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200255733)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 14:54:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983372#M26570</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-04-18T14:54:46Z</dc:date>
    </item>
    <item>
      <title>Thanks for replies!</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983373#M26571</link>
      <description>&lt;P&gt;Thanks for replies!&lt;/P&gt;

&lt;DIV class="forum-post-author"&gt;&lt;A href="https://community.intel.com/en-us/user/100158"&gt;jimdempseyatthecove&lt;/A&gt;:&lt;/DIV&gt;

&lt;P&gt;I would like to use multiple MIC device with OpenMP, so MIC regions is inside a OpenMP region. Originally these were in the same subroutine, but after separation, I could compile MIC code without -openmp compiler option. It's work, but I would like to compile all code with the same options, if it's possible.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2014 20:58:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983373#M26571</guid>
      <dc:creator>Zoltan_P_</dc:creator>
      <dc:date>2014-04-18T20:58:21Z</dc:date>
    </item>
    <item>
      <title>Zoltan,</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983374#M26572</link>
      <description>&lt;P&gt;Zoltan,&lt;/P&gt;

&lt;P&gt;RE Kevin's: &lt;EM&gt;I do not know whether any of these is usable in your original code, but for the test case, using either an allocatable array, or adding SAVE, or using other means to force array C into static storage with &lt;STRONG&gt;-openmp&lt;/STRONG&gt; avoids the incorrect results.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;You can also use AUTOMATIC, an&amp;nbsp;Intel specific attribute, though -openmp should (will) make local arrays on stack, and may be redundant for the purpose of allocation, but may have the side effect of fixing the compiler bug. Note, for large single instance arrays you can also use ALLOCATABLE, SAVE (places the descriptor in save area).&lt;/P&gt;

&lt;P&gt;Be aware that when multiple host OpenMP threads enter an offload to the same MIC, that this is somewhat equivalent to nested parallel regions. There is nothing wrong with doing this provided each host-to-MIC entry is programmed to use a subset of the available threads on the MIC. Failure to do so may yield unacceptable results.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sat, 19 Apr 2014 12:42:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983374#M26572</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-04-19T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Zoltan - It sounds like you</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983375#M26573</link>
      <description>&lt;P&gt;Zoltan - It sounds like you have been able to program around this issue. Our Developers confirmed there is a fix in the release scheduled for later this year and have asked whether a fix is required in a future update for the current Composer XE 2013 SP1 release.&lt;BR /&gt;
	Please let me know if your work around is sustainable until our release later this year.&lt;BR /&gt;
	Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 11:29:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-compilation-problem-with-openmp-option/m-p/983375#M26573</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-04-29T11:29:40Z</dc:date>
    </item>
  </channel>
</rss>

