<?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 in including third party headers in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925814#M13811</link>
    <description>&lt;P&gt;I am new to Xeon Phi and experimenting with the offload programming mode in a simple main.cpp file. Eventually I want to use the offload mode in connection to our astrodynamical&amp;nbsp;routines (I work at the&amp;nbsp;European Space Agency)&lt;/P&gt;

&lt;P&gt;I get the following error&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;catastrophic error: *MIC* cannot open source file "&lt;/SPAN&gt;pagmo&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;/&lt;/SPAN&gt;src&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;/keplerian_toolbox/lambert.h"&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The file lambert&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;.h (which exists on the host but not on the mic) is indeed included in main.cpp but its content is not used inside the offload directive.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I thought that the code for the mic was corss-compiled in the host, thus the headers had only to be on the host (I compiled boost and other libraries using the -mmic option like this) .... do I need to put all headers (also the boost ones) on the mic in this case? If so where?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Anyone has the same problem or I am just doing something very stupid?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Dario&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2013 17:48:18 GMT</pubDate>
    <dc:creator>Dario_I_</dc:creator>
    <dc:date>2013-12-02T17:48:18Z</dc:date>
    <item>
      <title>Problem in including third party headers</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925814#M13811</link>
      <description>&lt;P&gt;I am new to Xeon Phi and experimenting with the offload programming mode in a simple main.cpp file. Eventually I want to use the offload mode in connection to our astrodynamical&amp;nbsp;routines (I work at the&amp;nbsp;European Space Agency)&lt;/P&gt;

&lt;P&gt;I get the following error&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;catastrophic error: *MIC* cannot open source file "&lt;/SPAN&gt;pagmo&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;/&lt;/SPAN&gt;src&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;/keplerian_toolbox/lambert.h"&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The file lambert&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;.h (which exists on the host but not on the mic) is indeed included in main.cpp but its content is not used inside the offload directive.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I thought that the code for the mic was corss-compiled in the host, thus the headers had only to be on the host (I compiled boost and other libraries using the -mmic option like this) .... do I need to put all headers (also the boost ones) on the mic in this case? If so where?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Anyone has the same problem or I am just doing something very stupid?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Dario&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 17:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925814#M13811</guid>
      <dc:creator>Dario_I_</dc:creator>
      <dc:date>2013-12-02T17:48:18Z</dc:date>
    </item>
    <item>
      <title>The header files need to</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925815#M13812</link>
      <description>&lt;P&gt;The header files need to exist on the host only for compiling.&amp;nbsp; Since you have included it in the program, although not used in the offload code, you need to tell the compiler where to find it.&lt;/P&gt;

&lt;P&gt;When you compile your program for host you must be providing the info to the compiler either through command line option -I or through env variable INCLUDE.&amp;nbsp; For offload compilation you also need to indicate the location using -offload-option,mic,compiler,"-I /mypath/lambert.h"&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 00:59:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925815#M13812</guid>
      <dc:creator>Ravi_N_Intel</dc:creator>
      <dc:date>2013-12-03T00:59:41Z</dc:date>
    </item>
    <item>
      <title>Ok thanks,</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925816#M13813</link>
      <description>&lt;P&gt;Ok thanks,&lt;/P&gt;

&lt;P&gt;adjusting the compilation line to:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;icpc -openmp -offload-option,mic,compiler,"-I/usr/local/include/ -I/usr/include" &amp;nbsp;my_file.cpp&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;the code&amp;nbsp;compiles, but tons of warnings are produced, they all say:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;/usr/include/bits/stdio.h(132): warning #1292: *MIC* unknown attribute "__leaf__"&lt;/P&gt;

&lt;P&gt;can I get rid of them somehow?&lt;/P&gt;

&lt;P&gt;Dario&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 08:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925816#M13813</guid>
      <dc:creator>Dario_I_</dc:creator>
      <dc:date>2013-12-03T08:30:00Z</dc:date>
    </item>
    <item>
      <title>After reading this (http:/</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925817#M13814</link>
      <description>&lt;P&gt;After reading this (&lt;A href="http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-lin/GUID-C7EBD3CF-5031-4DD3-A774-0F54DB9E9BBF.htm"&gt;http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-lin/GUID-C7EBD3CF-5031-4DD3-A774-0F54DB9E9BBF.htm&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;I managed to find out that the following would indeed solve most of the problems:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;icpc -openmp -offload-option,mic,compiler,"-I/usr/local/include/ -I/usr/include" &amp;nbsp;prova_superlinear.cpp -o offload_no_mic&lt;/P&gt;

&lt;P&gt;but I still get tons of warnings:&lt;/P&gt;

&lt;P&gt;In file included from /usr/include/stdio.h(934),&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0/cstdio(44),&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from /usr/include/boost/lexical_cast.hpp(33),&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from /usr/local/include/pagmo/src/problem/../serialization.h(35),&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from /usr/local/include/pagmo/src/problem/ackley.h(30),&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from prova_superlinear.cpp(5):&lt;BR /&gt;
	/usr/include/bits/stdio.h(132): warning #1292: *MIC* unknown attribute "__leaf__"&lt;/P&gt;

&lt;P&gt;what am I forgetting now?&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>Tue, 03 Dec 2013 08:44:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925817#M13814</guid>
      <dc:creator>Dario_I_</dc:creator>
      <dc:date>2013-12-03T08:44:46Z</dc:date>
    </item>
    <item>
      <title>icpc -openmp -offload-option</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925818#M13815</link>
      <description>&lt;P&gt;icpc -openmp -offload-option,mic,compiler,"-I/usr/local/include/ -I/usr/include"prova_superlinear.cpp -o offload_no_mic&lt;/P&gt;

&lt;P&gt;/usr/local ....&amp;nbsp;&amp;nbsp;&amp;nbsp; are the includes for the host&lt;/P&gt;

&lt;P&gt;The includes for MIC are in /usr/linux-k1om-4.7/linux-k1om/usr/include/&amp;nbsp;&amp;nbsp; and you don't need to include them.&amp;nbsp; The compiler automatically picks them up if you have setup your env correctly using the compilervars script&amp;nbsp; in the compiler&amp;nbsp; bin directory.&amp;nbsp; Only add user include in the -offload-option,mic,compiler.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 19:20:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-in-including-third-party-headers/m-p/925818#M13815</guid>
      <dc:creator>Ravi_N_Intel</dc:creator>
      <dc:date>2013-12-03T19:20:06Z</dc:date>
    </item>
  </channel>
</rss>

