<?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 It is always best to use the in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980362#M25947</link>
    <description>&lt;P&gt;It is always best to use the pragma offload_attribute(push)/(pop).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The compiler can recognize certain function like printf&amp;nbsp; etc in the standard header files and generate the necessary code.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2013 16:00:40 GMT</pubDate>
    <dc:creator>Ravi_N_Intel</dc:creator>
    <dc:date>2013-03-26T16:00:40Z</dc:date>
    <item>
      <title>Valarray problem in an offload application</title>
      <link>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980359#M25944</link>
      <description>&lt;P&gt;I need to use valarrays from the Standard C++ Library on the coprocessor. I can do in the native mode, no problems with that.&amp;nbsp;In the past, I also could use them in offloaded code. &amp;nbsp;However, today I am getting a runtime error "undefined symbol ...valarray". I am using the Intel C++ Compiler version 2013.2.146 and MPSS version Gold Update 2. Any help is much appreciated!&lt;/P&gt;
&lt;P&gt;[cpp]&lt;/P&gt;
&lt;P&gt;#include &amp;lt;valarray&amp;gt;&lt;BR /&gt;int main() {&lt;BR /&gt;#pragma offload target(mic)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; std::valarray&amp;lt;double&amp;gt; x;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;[/cpp]&lt;/P&gt;
&lt;P&gt;[bash]&lt;/P&gt;
&lt;P&gt;[avladim@dublin ~]$ icpc valarrayoffload.cc&lt;BR /&gt;[avladim@dublin ~]$ ./a.out &lt;BR /&gt;On the remote process, dlopen() failed. The error message sent back from the sink is /tmp/coi_procs/1/12490/load_lib/icpcoutSvQfZa: undefined symbol: _ZNSt8valarrayIdEC1Ev&lt;BR /&gt;offload error: cannot load library to the device 0 (error code 20)&lt;BR /&gt;On the sink, dlopen() returned NULL. The result of dlerror() is "/tmp/coi_procs/1/12490/load_lib/icpcoutSvQfZa: undefined symbol: _ZNSt8valarrayIdEC1Ev"&lt;BR /&gt;[avladim@dublin ~]$&lt;/P&gt;
&lt;P&gt;[/bash]&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2013 22:49:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980359#M25944</guid>
      <dc:creator>Andrey_Vladimirov</dc:creator>
      <dc:date>2013-03-25T22:49:11Z</dc:date>
    </item>
    <item>
      <title>Can you change your code to</title>
      <link>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980360#M25945</link>
      <description>&lt;P&gt;Can you change your code to the following&lt;/P&gt;
&lt;P&gt;#pragma offload_attribute(push, target(mic))&lt;BR /&gt;#include &amp;lt;valarray&amp;gt;&lt;BR /&gt;#pragma offload_attribute(pop)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2013 23:33:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980360#M25945</guid>
      <dc:creator>Ravi_N_Intel</dc:creator>
      <dc:date>2013-03-25T23:33:35Z</dc:date>
    </item>
    <item>
      <title>Yes, #pragma offload</title>
      <link>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980361#M25946</link>
      <description>&lt;P&gt;Yes, #pragma offload_attribute(push)/(pop) fixes the problem.&amp;nbsp;Thank you, Ravi! Could you please explain: is this the intended behavior of the compiler / library? When I use #include &amp;lt;cstdio&amp;gt;, I don't need to enclose it in the offload_attribute region, it just works. Why do I need to do it for #include &amp;lt;valarray&amp;gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 02:20:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980361#M25946</guid>
      <dc:creator>Andrey_Vladimirov</dc:creator>
      <dc:date>2013-03-26T02:20:40Z</dc:date>
    </item>
    <item>
      <title>It is always best to use the</title>
      <link>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980362#M25947</link>
      <description>&lt;P&gt;It is always best to use the pragma offload_attribute(push)/(pop).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The compiler can recognize certain function like printf&amp;nbsp; etc in the standard header files and generate the necessary code.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 16:00:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Valarray-problem-in-an-offload-application/m-p/980362#M25947</guid>
      <dc:creator>Ravi_N_Intel</dc:creator>
      <dc:date>2013-03-26T16:00:40Z</dc:date>
    </item>
  </channel>
</rss>

