<?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 The fix for the earlier noted in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029016#M41278</link>
    <description>&lt;P&gt;The fix for the earlier noted HSD #5162051 will be in the upcoming &lt;STRONG&gt;MPSS 3.5&lt;/STRONG&gt; release. I don't have a definitive release date for this new MPSS release. I'll let you know once I hear. You can also subscribe to the &lt;A href="https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss" target="_blank"&gt;&lt;STRONG&gt;Intel® Manycore Platform Software Stack (MPSS)&lt;/STRONG&gt;&lt;/A&gt; page for updates.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Mar 2015 18:48:40 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2015-03-02T18:48:40Z</dc:date>
    <item>
      <title>Offload from dynamically loaded library ?</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1028999#M41261</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am new to programming for the Xeon Phi, and am having trouble getting explicit offload to work when the offload is done in a dynamically loaded library. The code fails at run time at the offload location, with the message&lt;/P&gt;

&lt;P&gt;"offload error: cannot load library to the device 0 (error code 5)"&lt;/P&gt;

&lt;P&gt;I am using C on &amp;nbsp;Scientific Linux 7, using Parallel Studio XE 2015 Update 1 Cluster Edition. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;A simple example of what I'm trying to do is below :&lt;/P&gt;

&lt;P&gt;A basic main program which loads the dynamic library and calls the function in it :&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;dlfcn.h&amp;gt;

int main()

{

        int (*fn)();
        
        void *lib_handle;
        lib_handle = dlopen("./hello.so", RTLD_LAZY);
 
        fn = dlsym(lib_handle, "sayhello");
        (fn)();
}        &lt;/PRE&gt;

&lt;P&gt;This is compiled with :&lt;/P&gt;

&lt;P&gt;icc loadsharedhello.c&lt;/P&gt;

&lt;P&gt;And the contents of dynamic library:&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;#include &amp;lt;stdio.h&amp;gt;

 __attribute__((target(mic))) void MyFunction() {
         printf("Hello World from coprocessor!\n");
        fflush(0);
 }

 int sayhello () {
         printf("Hello World from host!\n");
 #pragma offload target(mic)
         {
                 MyFunction();
         }
                printf("Bye\n");
 }&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;This is compiled with:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;icc &amp;nbsp;-shared -fpic dynamichello.c -o hello.so&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;If I do the offload in the main program, it works fine. Any clues as to what I'm doing wrong ?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 15:40:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1028999#M41261</guid>
      <dc:creator>William_H_3</dc:creator>
      <dc:date>2014-12-18T15:40:24Z</dc:date>
    </item>
    <item>
      <title>I forgot to add that if I set</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029000#M41262</link>
      <description>&lt;P&gt;I forgot to add that if I set the environment variable OFFLOAD_REPORT=3,&lt;/P&gt;

&lt;P&gt;I get an additional line in the error message :&lt;/P&gt;

&lt;P&gt;[Offload] [HOST] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[State] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Initialize logical card 0 = physical card 0&lt;BR /&gt;
	offload error: cannot load library to the device 0 (error code 5)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 16:12:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029000#M41262</guid>
      <dc:creator>William_H_3</dc:creator>
      <dc:date>2014-12-18T16:12:32Z</dc:date>
    </item>
    <item>
      <title>I don't think you've coded</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029001#M41263</link>
      <description>&lt;P&gt;I don't think you've coded anything incorrectly.&amp;nbsp; What version of MPSS are you using?&lt;/P&gt;

&lt;P&gt;Perhaps there's an issue with your OS -- officially Scientific Linux 7 is not supported for Phi systems, although other non-official OSes can be made to work, eg, Ubuntu 12.04 or later.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is Scientific Linux 7 based on Redhat 7?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;[U537432]$ icc -V&lt;BR /&gt;
	Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.1.133 Build 20141023&lt;BR /&gt;
	Copyright (C) 1985-2014 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;[U537432]$ icc&amp;nbsp; -shared -fpic dynamichello.c -o hello.so&lt;BR /&gt;
	[U537432]$ icc loadsharedhello.c -o loadsharedhello.x&lt;BR /&gt;
	[U537432]$ ./loadsharedhello.x&lt;BR /&gt;
	Hello World from host!&lt;BR /&gt;
	Bye&lt;BR /&gt;
	Hello World from coprocessor!&lt;BR /&gt;
	[U537432]$&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 16:28:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029001#M41263</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2014-12-18T16:28:49Z</dc:date>
    </item>
    <item>
      <title>mpss is version 3.4.2</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029002#M41264</link>
      <description>&lt;P&gt;mpss is version 3.4.2&lt;/P&gt;

&lt;P&gt;Yes, Scientific Linux 7 is based on Red Hat 7&lt;/P&gt;

&lt;P&gt;Thanks for the reply.&lt;/P&gt;

&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 16:42:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029002#M41264</guid>
      <dc:creator>William_H_3</dc:creator>
      <dc:date>2014-12-18T16:42:33Z</dc:date>
    </item>
    <item>
      <title>RHEL 7 + MPSS 3.4.2 is a</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029003#M41265</link>
      <description>&lt;P&gt;RHEL 7 + MPSS 3.4.2 is a supported combination, so I think there is a reasonable chance this can be made to work with Scientific Linux 7.&amp;nbsp; Did you doing anything special (like build MPSS from source), or did you just install the compilers and MPSS right out of the box 'as-is'?&lt;/P&gt;

&lt;P&gt;Can you run miccheck to verify you're system is functioning properly?&amp;nbsp; The following is from&amp;nbsp;an older MPSS system, but you should see something like the following if the system is OK:&lt;/P&gt;

&lt;P&gt;[root~]# miccheck&lt;BR /&gt;
	MicCheck 3.2-r1&lt;BR /&gt;
	Copyright 2013 Intel Corporation All Rights Reserved&lt;/P&gt;

&lt;P&gt;Executing default tests for host&lt;BR /&gt;
	&amp;nbsp; Test 0: Check number of devices the OS sees in the system ... pass&lt;BR /&gt;
	&amp;nbsp; Test 1: Check mic driver is loaded ... pass&lt;BR /&gt;
	&amp;nbsp; Test 2: Check number of devices driver sees in the system ... pass&lt;BR /&gt;
	&amp;nbsp; Test 3: Check mpssd daemon is running ... pass&lt;BR /&gt;
	Executing default tests for device: 0&lt;BR /&gt;
	&amp;nbsp; Test 4 (mic0): Check device is in online state and its postcode is FF ... pass&lt;BR /&gt;
	&amp;nbsp; Test 5 (mic0): Check ras daemon is available in device ... pass&lt;BR /&gt;
	&amp;nbsp; Test 6 (mic0): Check running flash version is correct ... pass&lt;BR /&gt;
	Executing default tests for device: 1&lt;BR /&gt;
	&amp;nbsp; Test 7 (mic1): Check device is in online state and its postcode is FF ... pass&lt;BR /&gt;
	&amp;nbsp; Test 8 (mic1): Check ras daemon is available in device ... pass&lt;BR /&gt;
	&amp;nbsp; Test 9 (mic1): Check running flash version is correct ... pass&lt;/P&gt;

&lt;P&gt;Status: OK&lt;BR /&gt;
	[root~]#&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 17:04:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029003#M41265</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2014-12-18T17:04:35Z</dc:date>
    </item>
    <item>
      <title>A colleague of mine also made</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029004#M41266</link>
      <description>&lt;P&gt;A colleague of mine also made this suggestion (he's unable to access this Forum at the moment) --&lt;/P&gt;

&lt;P&gt;In your dlopen() call, use the full pathname to the .so instead of a relative pathname.&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 17:22:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029004#M41266</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2014-12-18T17:22:19Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029005#M41267</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks again for the speedy replies. &amp;nbsp;Output of miccheck looks good to me:&lt;/P&gt;

&lt;P&gt;MicCheck 3.4.2-r1&lt;BR /&gt;
	Copyright 2013 Intel Corporation All Rights Reserved&lt;/P&gt;

&lt;P&gt;Executing default tests for host&lt;BR /&gt;
	&amp;nbsp; Test 0: Check number of devices the OS sees in the system ... pass&lt;BR /&gt;
	&amp;nbsp; Test 1: Check mic driver is loaded ... pass&lt;BR /&gt;
	&amp;nbsp; Test 2: Check number of devices driver sees in the system ... pass&lt;BR /&gt;
	&amp;nbsp; Test 3: Check mpssd daemon is running ... pass&lt;BR /&gt;
	Executing default tests for device: 0&lt;BR /&gt;
	&amp;nbsp; Test 4 (mic0): Check device is in online state and its postcode is FF ... pass&lt;BR /&gt;
	&amp;nbsp; Test 5 (mic0): Check ras daemon is available in device ... pass&lt;BR /&gt;
	&amp;nbsp; Test 6 (mic0): Check running flash version is correct ... pass&lt;BR /&gt;
	&amp;nbsp; Test 7 (mic0): Check running SMC firmware version is correct ... pass&lt;/P&gt;

&lt;P&gt;Status: OK&lt;/P&gt;

&lt;P&gt;The use of an absolute path sounded promising to me, but didn't have any effect. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 18:52:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029005#M41267</guid>
      <dc:creator>William_H_3</dc:creator>
      <dc:date>2014-12-18T18:52:37Z</dc:date>
    </item>
    <item>
      <title>I wonder if it has anything</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029006#M41268</link>
      <description>&lt;P&gt;I wonder if it has anything to do with using&amp;nbsp;dlopen and&amp;nbsp;dlsym rather than linking to the hello.so&amp;nbsp;library when you build the executable. Do the necessary C libraries used by&amp;nbsp;hello.so get copied to the coprocessor when the linking is done using dlopen? Perhaps the machine Patrick is using has the libraries permanently installed or NFS mounted to the coprocessor but the machine William is using does not.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 19:23:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029006#M41268</guid>
      <dc:creator>Frances_R_Intel</dc:creator>
      <dc:date>2014-12-18T19:23:50Z</dc:date>
    </item>
    <item>
      <title>The error is reproducible</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029007#M41269</link>
      <description>&lt;P&gt;The error is reproducible under MPSS 3.4.1 only with our 15.0 release. The error differs slightly depending on whether one uses the 15.0 initial release or Update 1 release. The initial release throws "&lt;STRONG&gt;offload error: target executable is not available&lt;/STRONG&gt;". Update 1 throws the error you showed.&lt;/P&gt;

&lt;P&gt;With 15.0 when the main program lacks offload but uses .so that do, you must add &lt;STRONG&gt;-offload&lt;/STRONG&gt; to at least the linking of the main program.&lt;/P&gt;

&lt;P&gt;To resolve your issue, add &lt;STRONG&gt;-offload&lt;/STRONG&gt; to compilation (or the link if you want to compile the main to object first) for the main program and also ensure your &lt;STRONG&gt;MIC_LD_LIBRARY_PATH&lt;/STRONG&gt; environment variable setting includes the path to the hello.so. That can either be “&lt;STRONG&gt;.&lt;/STRONG&gt;” or if you prefer the full path on the host where hello.so resides. It does not matter whether you include "./" in the dlopen or not since that path is only relevant on the host where dlopen executes.&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;$ icc -shared -fpic dynamichello.c -o hello.so
$ icc loadsharedhello.c -c
$ icc loadsharedhello.o
$ ./a.out
Hello World from host!
offload error: cannot load library to the device 0 (error code 5)

$ icc loadsharedhello.o -offload
$ ./a.out
Hello World from host!
offload error: cannot load library to the device 0 (error code 5)

$ export MIC_LD_LIBRARY_PATH=.:$MIC_LD_LIBRARY_PATH
$ ./a.out
Hello World from host!
Bye
Hello World from coprocessor!&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2014 12:49:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029007#M41269</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-12-19T12:49:09Z</dc:date>
    </item>
    <item>
      <title>Excellent ! That resolves the</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029008#M41270</link>
      <description>&lt;P&gt;Excellent ! That resolves the problem. &amp;nbsp;Thanks very much to all who responded for your attention to this issue.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2014 13:06:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029008#M41270</guid>
      <dc:creator>William_H_3</dc:creator>
      <dc:date>2014-12-19T13:06:40Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029009#M41271</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;System: parallel_studio_xe_2015, Centos 7.0, MPSS 3.4.2.&lt;/P&gt;

&lt;P&gt;I got similar&amp;nbsp; problem but the above solution does not work.&lt;/P&gt;

&lt;P&gt;I created a dynamic library&amp;nbsp;&amp;nbsp; .so, which will load from python. I did add &lt;STRONG&gt;-offload&lt;/STRONG&gt; option when make the library. The library will do main calculation, which also offloads to Xeon Phi.&lt;/P&gt;

&lt;P&gt;I also did&lt;/P&gt;

&lt;P&gt;export MIC_LD_LIBRARY_PATH=/home/beowulf/intel:/opt/intel/composer_xe_2015.0.090/compiler/lib/mic:/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/amplxe/device/lib64&lt;/P&gt;

&lt;P&gt;but when I run the python code, which will load the dynamic library. It reports the following error&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;"offload error: target executable is not available"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;However&amp;nbsp; I can run the offload program directly from the command line.&lt;/P&gt;

&lt;P&gt;Any advice to solve this problem?&lt;/P&gt;

&lt;P&gt;I also tried the tricks in&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/forums/topic/534589" target="_blank"&gt;https://software.intel.com/en-us/forums/topic/534589&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;However due to different compiler version, I could not find similar locations for all paths.&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;

&lt;P&gt;&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;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 17:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029009#M41271</guid>
      <dc:creator>Minh_H_</dc:creator>
      <dc:date>2015-01-06T17:40:00Z</dc:date>
    </item>
    <item>
      <title>What MPSS version are you</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029010#M41272</link>
      <description>&lt;P&gt;What MPSS version are you using?&lt;/P&gt;

&lt;P&gt;The &lt;STRONG&gt;-offload&lt;/STRONG&gt; is used for compilation/link of the main program that calls into a .so (containing offload code) but where the main program itself does not include any offload code. The option has no effect building the .so&amp;nbsp; that already contains offload code.&lt;/P&gt;

&lt;P&gt;Ensure the &lt;STRONG&gt;MIC_LD_LIBRARY_PATH&lt;/STRONG&gt; setting includes the path to where your offloaded .so resides. I’m thinking perhaps you have via the &lt;STRONG&gt;/home&lt;/STRONG&gt; path you included.&lt;/P&gt;

&lt;P&gt;I worked on something similar to what you described a few releases back but I do not have a mockup handy at the moment that I can tinker with but will try creating one to see what is required with the newer compiler/MPSS releases.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 18:48:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029010#M41272</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-01-06T18:48:22Z</dc:date>
    </item>
    <item>
      <title>Hi Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029011#M41273</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;

&lt;P&gt;MPSS 3.4.2.&lt;/P&gt;

&lt;P&gt;I did include the path to .so in &lt;STRONG&gt;MIC_LD_LIBRARY_PATH&lt;/STRONG&gt; as you realized (/home/beowulf/intel).&lt;/P&gt;

&lt;P&gt;Please let me know when you have a solution for this problem.&lt;/P&gt;

&lt;P&gt;Thanks, M&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 07:30:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029011#M41273</guid>
      <dc:creator>Minh_H_</dc:creator>
      <dc:date>2015-01-07T07:30:52Z</dc:date>
    </item>
    <item>
      <title>Hi Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029012#M41274</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;

&lt;P&gt;System: parallel_studio_xe_2015, Centos 7.0, MPSS 3.4.2.&lt;/P&gt;

&lt;P&gt;Here are simple python interface code could reproduce the problem&lt;/P&gt;

&lt;P&gt;-----------------------------------------------------------------------------------------&lt;/P&gt;

&lt;P&gt;/*&lt;BR /&gt;
	&amp;nbsp;* Create simple python interface&lt;BR /&gt;
	&amp;nbsp;* File: pymichello.c&lt;BR /&gt;
	&amp;nbsp;* compile:&lt;BR /&gt;
	&amp;nbsp;*&amp;nbsp; icc&amp;nbsp;&amp;nbsp; -shared&amp;nbsp; -O2 -fPIC&amp;nbsp; -offload-attribute-target=mic&amp;nbsp; -I /usr/include/python2.7&amp;nbsp; -I /usr/lib64/python2.7/site-packages/numpy/core/include&amp;nbsp;&amp;nbsp; pymichello.c&amp;nbsp; -openmp -lc&amp;nbsp;&amp;nbsp; -o _pymichello.so&lt;BR /&gt;
	&amp;nbsp;* &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;* */&lt;/P&gt;

&lt;P&gt;#include "Python.h"&lt;BR /&gt;
	#include "numpy/arrayobject.h"&lt;BR /&gt;
	#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;

&lt;P&gt;static char&amp;nbsp; py_michello_doc[] = "Hello from MIC ";&lt;/P&gt;

&lt;P&gt;static PyObject *py_michello(PyObject *self, PyObject *args)&lt;BR /&gt;
	{&lt;BR /&gt;
	#pragma offload target(mic)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("Hello from MIC");&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("Hello from host");&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;return Py_BuildValue("I",0);&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;static PyObject *py_michello1(PyObject *self, PyObject *args)&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;int i1, i2;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;i1 = 1;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;i2 = 2;&lt;BR /&gt;
	#pragma offload target(mic) inout(i1)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;i1 = i1*224;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;return Py_BuildValue("I",i1+ i2);&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;static&amp;nbsp; PyMethodDef&amp;nbsp; _pymichellomethods[] =&lt;BR /&gt;
	{&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{"py_michello", py_michello, METH_VARARGS, py_michello_doc},&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{"py_michello1", py_michello1, METH_VARARGS, py_michello_doc},&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{NULL, NULL, 0, NULL}&lt;BR /&gt;
	};&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	/* Python 2 module initialisation */&lt;BR /&gt;
	//add module clean up using:&amp;nbsp; int Py_AtExit(void (*func) ()): register clean up function&lt;BR /&gt;
	void init_pymichello(void)&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;PyObject *mod;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;mod = Py_InitModule("_pymichello",_pymichellomethods);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;import_array();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//clean up module&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;//Py_AtExit(py_module_clean);&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	----------------------------------------------------------------------------&lt;/P&gt;

&lt;P&gt;#File : michello.py&lt;/P&gt;

&lt;P&gt;from _pymichello&amp;nbsp; import&amp;nbsp; py_michello, py_michello1&lt;/P&gt;

&lt;P&gt;print(py_michello1())&lt;BR /&gt;
	py_michello()&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;---------------------------------------------&lt;/P&gt;

&lt;P&gt;&amp;nbsp;export OFFLOAD_INIT=&lt;/P&gt;

&lt;P&gt;offload error: target executable is not available&lt;/P&gt;

&lt;P&gt;-----------------------------------------------------&lt;/P&gt;

&lt;P&gt;export OFFLOAD_INIT=on_start&lt;/P&gt;

&lt;P&gt;[Offload] [MIC 0] [File]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pymichello.c&lt;BR /&gt;
	[Offload] [MIC 0] [Line]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26&lt;BR /&gt;
	[Offload] [MIC 0] [Tag]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tag 0&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [State]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start target&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [State]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Setup target entry: __offload_entry_pymichello_c_26py_michello1icc1406040670nttqy4&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [State]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Host-&amp;gt;target pointer data 0&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [Signal]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signal : none&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [Signal]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; waits&amp;nbsp; : none&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [State]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Host-&amp;gt;target pointer data 0&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [State]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Host-&amp;gt;target copyin data 4&lt;BR /&gt;
	[Offload] [HOST]&amp;nbsp; [Tag 0] [State]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execute task on target&lt;BR /&gt;
	offload error: cannot create pipeline on the device 0 (error code 14)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 16:07:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029012#M41274</guid>
      <dc:creator>Minh_H_</dc:creator>
      <dc:date>2015-01-08T16:07:36Z</dc:date>
    </item>
    <item>
      <title>Thank you for the test case.</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029013#M41275</link>
      <description>&lt;P&gt;Thank you for the test case. That was very helpful and useful.&lt;/P&gt;

&lt;P&gt;There are two issues at play, a compiler and an MPSS 3.4.1. I do not have a complete resolution yet when using the MPSS 3.4.1 release nor know whether 3.4.2 has a fix so I have to upgrade and test MPSS 3.4.2 also.&lt;/P&gt;

&lt;P&gt;To resolve the issue/error you currently experienced you will need the &lt;STRONG&gt;IPS XE 2015 Update 1&lt;/STRONG&gt; release at least so you will have to upgrade your IPS release. When using that release the issue with MPSS 3.4.1 surfaces which I am still investigating. Some good news is that I confirmed that your test case and one I worked earlier both run successfully using the &lt;STRONG&gt;IPS XE 2015 Update 1&lt;/STRONG&gt; release but on the earlier MPSS 3.2.4 release only. With MPSS 3.4.1 there is a run-time issue with loading dependent .so libs. I will keep you updated as I learn more.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:20:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029013#M41275</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-01-08T20:20:48Z</dc:date>
    </item>
    <item>
      <title>Hi Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029014#M41276</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;

&lt;P&gt;Does the update &lt;STRONG&gt;IPS XE 2015 Update 1&lt;/STRONG&gt; work for MPSS 3.4.2?&amp;nbsp; Do I need to downgrade to MPSS 3.2.4 to be able to offload code from dynamic library? Is this safe to do so, i.e., re-flash with older&amp;nbsp; flash version?&lt;/P&gt;

&lt;P&gt;&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 10:35:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029014#M41276</guid>
      <dc:creator>Minh_H_</dc:creator>
      <dc:date>2015-01-14T10:35:49Z</dc:date>
    </item>
    <item>
      <title>Yes, IPS XE 2015 Update 1 is</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029015#M41277</link>
      <description>&lt;P&gt;Yes, &lt;STRONG&gt;IPS XE 2015 Update 1&lt;/STRONG&gt; is compatible with the earlier &lt;STRONG&gt;MPSS 3.2.4&lt;/STRONG&gt; release (which I think is what you were asking). Unfortunately, if you need to progress then downgrading to &lt;STRONG&gt;MPSS 3.2.4 &lt;/STRONG&gt;is really the only option since I cannot offer any alternative/more convenient work around at the moment. The MPSS may be looking into this issue shortly and might have a more convenient work around if you are able to wait.&lt;/P&gt;

&lt;P&gt;In downgrading MPSS, if it were me, I would initially just uninstall &lt;STRONG&gt;MPSS 3.4.2 &lt;/STRONG&gt;and install &lt;STRONG&gt;MPSS 3.2.4&lt;/STRONG&gt; and *not* re-flash and check whether offload works. Personally, I would avoid re-flashing to older flash, BUT, I say that without any experience/knowledge whether it is problematic or safe. I have just avoided ever re-flashing to older flash.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Updated:&lt;/STRONG&gt; I filed the issue with the MPSS Development team. (Internal tracking id: HSD #5162051)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;(Resolution Update on 04/08/2015):&lt;/STRONG&gt; This defect is fixed the MPSS 3.5 release&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:29:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029015#M41277</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-01-14T16:29:00Z</dc:date>
    </item>
    <item>
      <title>The fix for the earlier noted</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029016#M41278</link>
      <description>&lt;P&gt;The fix for the earlier noted HSD #5162051 will be in the upcoming &lt;STRONG&gt;MPSS 3.5&lt;/STRONG&gt; release. I don't have a definitive release date for this new MPSS release. I'll let you know once I hear. You can also subscribe to the &lt;A href="https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss" target="_blank"&gt;&lt;STRONG&gt;Intel® Manycore Platform Software Stack (MPSS)&lt;/STRONG&gt;&lt;/A&gt; page for updates.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2015 18:48:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029016#M41278</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-03-02T18:48:40Z</dc:date>
    </item>
    <item>
      <title>The MPSS 3.5 release was just</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029017#M41279</link>
      <description>&lt;P&gt;The MPSS 3.5 release was just announced. You can refer to the &lt;A href="https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss"&gt;&lt;STRONG&gt;Intel® Manycore Platform Software Stack (MPSS)&lt;/STRONG&gt;&lt;/A&gt; page for some details and links to the MPSS 3.5 downloads. While I verified a fix internally for the earlier indicated HSD (the loading of dependent .so libs issue), I have not yet installed MPSS 3.5 to verify the fix using the actual release, but it should be included.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:21:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-from-dynamically-loaded-library/m-p/1029017#M41279</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-04-08T09:21:07Z</dc:date>
    </item>
  </channel>
</rss>

