<?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 Ok, great. Glad to hear that. in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107102#M70807</link>
    <description>&lt;P&gt;Ok, great. Glad to hear that.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2015 08:23:38 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2015-12-15T08:23:38Z</dc:date>
    <item>
      <title>Ofload error - data transfer</title>
      <link>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107099#M70804</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am writing, because i have a problem with data transfer from a coprocessor to a host processor in offload mode.&amp;nbsp;In brief: at the beginning of my computation, I transfer all data to a coprocessor (one array), After completion of calculation I want to transfer to a host processor only part of this array, but in result i get following error:&lt;/P&gt;

&lt;PRE class="brush:;"&gt;offload error: data transfer (base=0x75654640, size=7896016) not subset of existing allocation (base=0x75654640, size=4512008)&lt;/PRE&gt;

&lt;P&gt;Here is example of source code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;array_Dc = _mm_malloc(..., 64);
...
#pragma offload target(mic : micZero) \
 in(array_Dc : length(size) alloc_if(0) free_if(0)) \
 out(array_Dc[micBegin : micEnd] : alloc_if(0) free_if(0) 
{
   //...
}&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; line-height: 19.5px;"&gt;In this case size of this array = 564001, micBegin = 423001, micEnd = 564001. I need to transfer the data because they are used by CPU. What is a problem? How to resolve it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2015 19:39:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107099#M70804</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2015-12-12T19:39:27Z</dc:date>
    </item>
    <item>
      <title>I see two different array</title>
      <link>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107100#M70805</link>
      <description>&lt;P&gt;I see two different array names in your offload pragma which&amp;nbsp;I expect is&amp;nbsp;intentional but I cannot determine enough of your interest or what you have currently tried from the small code snippet to advise on the error or what to do. Your scenario may be one where you could use the &lt;STRONG&gt;into &lt;/STRONG&gt;and &lt;STRONG&gt;alloc &lt;/STRONG&gt;modifiers or there may be others alternatives but to know requires having a better understanding of your interests.&lt;/P&gt;

&lt;P&gt;Its possible the error relates to not allocating "array".&lt;/P&gt;

&lt;P&gt;You might look at the &lt;STRONG&gt;sampleC14.c&lt;/STRONG&gt; sample from the Xeon Phi™ product samples found under /opt/intel/samples_2016/en/compiler_c/psxe/mic_samples.tgz (for PSXE 2016), or under /opt/intel/composer_xe_2015/Samples/en_US/C++ (for PSXE 2015).&lt;/P&gt;

&lt;P&gt;There are also topics in the C++ User's Guide that might help:&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/node/583642" target="_blank"&gt;Allocating Memory for Parts of Arrays&lt;/A&gt;&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/node/583638" target="_blank"&gt;Managing Memory Allocation for Pointer Variables&lt;/A&gt;&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/node/583639" target="_blank"&gt;Device-Only Memory Allocation&lt;/A&gt;&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/node/583643" target="_blank"&gt;Moving Data from One Variable to Another&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you can offer more details about&amp;nbsp; the &lt;STRONG&gt;out &lt;/STRONG&gt;“array”, where that’s declared/allocated,&amp;nbsp;that might help. If it's possible to share your program or a smaller reproducer then we can investigate further with that also.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 08:21:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107100#M70805</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-12-14T08:21:29Z</dc:date>
    </item>
    <item>
      <title>There was mistake in a</title>
      <link>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107101#M70806</link>
      <description>&lt;P&gt;There was mistake in a presented piece of a source code. I use the same table "array Dc" for &lt;STRONG&gt;in &lt;/STRONG&gt;and &lt;STRONG&gt;out&lt;/STRONG&gt; pragma.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Edit:&lt;/P&gt;

&lt;P&gt;I found a solution of my problem in attached articles.&amp;nbsp;I had a mistake in out pragma.&lt;/P&gt;

&lt;P&gt;I thought that "out(x[a : b])" returns elements of x table from a to b, for example: out(x[3:5]) returns elements x[3],x[4],x[5].&lt;/P&gt;

&lt;P&gt;In fact, it returns the "b" elements starting of x&lt;A&gt;. It's my mistake.&amp;nbsp;I have a poor experience of offload model.&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks for articles. :)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 09:43:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107101#M70806</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2015-12-14T09:43:00Z</dc:date>
    </item>
    <item>
      <title>Ok, great. Glad to hear that.</title>
      <link>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107102#M70807</link>
      <description>&lt;P&gt;Ok, great. Glad to hear that.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 08:23:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Ofload-error-data-transfer/m-p/1107102#M70807</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-12-15T08:23:38Z</dc:date>
    </item>
  </channel>
</rss>

