<?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 Targetting specific cards at runtime in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985254#M26985</link>
    <description>&lt;P&gt;I have a question about targetting specific Intel Phi cards at runtime (assuming you have more than one card installed in a machine). I've seen in the documentation that you can do #pragma offload target(mic) which seems to amount to "any available MIC", and you can also do #pragma offload target(mic:0) which is specifically device 0, but a compile time choice. How do you turn that into a variable to target mic:X where X is not known until runtime? Also, how do you query the system to find out how many MICs are available and what their device #s are?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jan 2013 21:24:35 GMT</pubDate>
    <dc:creator>Michael_H_7</dc:creator>
    <dc:date>2013-01-04T21:24:35Z</dc:date>
    <item>
      <title>Targetting specific cards at runtime</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985254#M26985</link>
      <description>&lt;P&gt;I have a question about targetting specific Intel Phi cards at runtime (assuming you have more than one card installed in a machine). I've seen in the documentation that you can do #pragma offload target(mic) which seems to amount to "any available MIC", and you can also do #pragma offload target(mic:0) which is specifically device 0, but a compile time choice. How do you turn that into a variable to target mic:X where X is not known until runtime? Also, how do you query the system to find out how many MICs are available and what their device #s are?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 21:24:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985254#M26985</guid>
      <dc:creator>Michael_H_7</dc:creator>
      <dc:date>2013-01-04T21:24:35Z</dc:date>
    </item>
    <item>
      <title>For C/C++, include offload.h</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985255#M26986</link>
      <description>For C/C++, include offload.h and call the &lt;STRONG&gt;_Offload_number_of_devices() &lt;/STRONG&gt;(C++) API. 
For Fortran, USE mic_lib and call &lt;STRONG&gt;OFFLOAD_NUMBER_OF_DEVICES() &lt;/STRONG&gt;(Fortran) API.

There are also APIs to return the coprocessor on which the offload is running: &lt;STRONG&gt;_Offload_get_device_number() &lt;/STRONG&gt; (C++) and &lt;STRONG&gt; OFFLOAD_GET_DEVICE_NUMBER()&lt;/STRONG&gt; (Fortran)

For run-time coprocessor selection, use an int variable, or integer expression, for target-number whose value is assigned at run-time.

int x;
...
x = 1;
...
#pragma offload target (mic: x)
...
x = 0;
...
#pragma offload target (mic: x)
...</description>
      <pubDate>Fri, 04 Jan 2013 23:15:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985255#M26986</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-01-04T23:15:00Z</dc:date>
    </item>
    <item>
      <title>That sounds simple enough,</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985256#M26987</link>
      <description>That sounds simple enough, thank you. In follow-up though, I have seen a lot of reference to "offload.h" that you mention in several documents, but I do not seem to have such a file on my computer. I have installed C Studio XE 2013 (Windows version). OpenMP stuff is compiling fine (I can include omp.h) but cannot seem to include offload.h or use any of the offload-related things (for example putting __attribute((target(mic))) on a function). I'm guessing there is something straight-forward I am missing (like a compile switch somewhere? I am using Visual Studio 2008).

Any help would be appreciated. Thanks.</description>
      <pubDate>Mon, 07 Jan 2013 20:28:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985256#M26987</guid>
      <dc:creator>Michael_H_7</dc:creator>
      <dc:date>2013-01-07T20:28:12Z</dc:date>
    </item>
    <item>
      <title>At present you'll only find</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985257#M26988</link>
      <description>At present you'll only find offload.h (in &lt;INSTALL_DIR&gt;/compiler/include&amp;gt;) in the Linux version of Intel(r) Composer XE, as Intel(r) Xeon Phi(tm) isn't supported on Windows yet.
Sorry,
Charles&lt;/INSTALL_DIR&gt;</description>
      <pubDate>Tue, 08 Jan 2013 20:39:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985257#M26988</guid>
      <dc:creator>Charles_C_Intel1</dc:creator>
      <dc:date>2013-01-08T20:39:18Z</dc:date>
    </item>
    <item>
      <title>Ah, that would explain a lot.</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985258#M26989</link>
      <description>Ah, that would explain a lot. What is the timeframe for it being included in the Windows version of the compiler?</description>
      <pubDate>Tue, 08 Jan 2013 21:22:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985258#M26989</guid>
      <dc:creator>Michael_H_7</dc:creator>
      <dc:date>2013-01-08T21:22:59Z</dc:date>
    </item>
    <item>
      <title>Unfortunately, that's not a</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985259#M26990</link>
      <description>&lt;P&gt;Unfortunately, that's not a question I can answer at this time.&amp;nbsp; :-(&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 21:29:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985259#M26990</guid>
      <dc:creator>Charles_C_Intel1</dc:creator>
      <dc:date>2013-01-11T21:29:18Z</dc:date>
    </item>
    <item>
      <title>Refer to this thread http:/</title>
      <link>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985260#M26991</link>
      <description>&lt;P&gt;Refer to this thread &lt;A href="http://software.intel.com/en-us/forums/topic/337513"&gt;http://software.intel.com/en-us/forums/topic/337513&lt;/A&gt;&amp;nbsp;for some info about Windows support.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2013 17:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Targetting-specific-cards-at-runtime/m-p/985260#M26991</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-01-16T17:50:00Z</dc:date>
    </item>
  </channel>
</rss>

