<?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 &amp;gt; I'm guessing this would be in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947611#M18699</link>
    <description>&lt;P&gt;&amp;gt; I'm guessing this would be something the sysadmins would need to install for me?&lt;/P&gt;
&lt;P&gt;Yes, you would need your sysadmin to do this on the host processor.&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2013 09:34:49 GMT</pubDate>
    <dc:creator>James_C_Intel2</dc:creator>
    <dc:date>2013-05-15T09:34:49Z</dc:date>
    <item>
      <title>Problem building for MIC as build process needs to execute binaries</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947606#M18694</link>
      <description>&lt;P&gt;Hi Folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently trying to build the version 1.1.4 of the libint library (the code can be found at &lt;A href="http://sourceforge.net/projects/libint/files/v1-releases/libint-1.1.4.tar.gz/download)" target="_blank"&gt;http://sourceforge.net/projects/libint/files/v1-releases/libint-1.1.4.tar.gz/download)&lt;/A&gt; &amp;nbsp;for use with the CP2K code on the MIC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My configure line is as follows:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;./configure CXX=icpc CC=icc FC=ifort FFLAGS="-O3 -mmic" --with-cc-optflags="-O3 -mmic" --with-cxx-optflags="-O3 -mmic" --with-libdirs="-O3 -mmic" --prefix=/users/fiona/lib/libint-intel-mic --host=x86_64-unknown-linux-gnu&lt;/P&gt;
&lt;P&gt;The --host flag ensures cross compilation, otherwise configure will fail when it attempts to execute a binary compiled for the MIC on the host.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The build (make) process for libint 1.1.4 executes a number of binaries however as these are compiled up for the MIC cards my build fails as the host can't execute the MIC binary.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My MIC cards don't have any compilers available on them thus compiling everything on the MIC isn't an option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions for how to get round this problem would be brilliant. &amp;nbsp;It must be something other MIC users have encountered as quite a number of codes and libraries execute binaries as part of their build process.&lt;/P&gt;
&lt;P&gt;Many thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fiona&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 15:05:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947606#M18694</guid>
      <dc:creator>Fiona_R_</dc:creator>
      <dc:date>2013-05-02T15:05:00Z</dc:date>
    </item>
    <item>
      <title>Hi Folks, </title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947607#M18695</link>
      <description>&lt;P&gt;Hi Folks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies, I've now found a solution, basically, do the majority of the build on the host and when the build fails execute the 3 binaries: build_libint, build_libr12 and build_libderiv on the MIC and resume the build on the host. It's rather clunky, but as I need the libraries to be optimised for the MIC it looks like there's no other option here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fiona&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 16:17:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947607#M18695</guid>
      <dc:creator>Fiona_R_</dc:creator>
      <dc:date>2013-05-02T16:17:19Z</dc:date>
    </item>
    <item>
      <title>The nomenclature is confusing</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947608#M18696</link>
      <description>&lt;P&gt;The nomenclature is confusing, but --host should not be set to the build system. &amp;nbsp;x86_64-unknown-linux-gnu is a generic description for a standard x86-64 system running Linux. I have had success using --host=blackfin which works because it does not match the build system description and so configure does not try to run code because it knows the code is being cross-compiled.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 17:11:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947608#M18696</guid>
      <dc:creator>DubitoCogito</dc:creator>
      <dc:date>2013-05-02T17:11:36Z</dc:date>
    </item>
    <item>
      <title>Using --host=blackfin gives</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947609#M18697</link>
      <description>&lt;P&gt;Using --host=blackfin gives the following error as there's no blackfin target in configure etc:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;checking build system type... x86_64-unknown-linux-gnu&lt;BR /&gt;checking host system type... Invalid configuration `blackfin': machine `blackfin' not recognized&lt;BR /&gt;configure: error: /bin/sh bin/config.sub blackfin failed&lt;/P&gt;
&lt;P&gt;I used --host=blackfin to build fftw3.3.3 but I don't think that wil work for libint-1.1.4. Running the make on the host (where I have compilers available) and then executing the 3 binaries on the MIC seems to give me a MIC compatible library.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fiona&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2013 08:14:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947609#M18697</guid>
      <dc:creator>Fiona_R_</dc:creator>
      <dc:date>2013-05-03T08:14:32Z</dc:date>
    </item>
    <item>
      <title>Thanks Olli, </title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947610#M18698</link>
      <description>&lt;P&gt;Thanks Olli,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless I'm missing something obvious I don't see any micrun.txt attachment?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm guessing this would be something the sysadmins would need to install for me? I don't have root access!&lt;/P&gt;
&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fiona&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2013 13:59:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947610#M18698</guid>
      <dc:creator>Fiona_R_</dc:creator>
      <dc:date>2013-05-09T13:59:25Z</dc:date>
    </item>
    <item>
      <title>&gt; I'm guessing this would be</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947611#M18699</link>
      <description>&lt;P&gt;&amp;gt; I'm guessing this would be something the sysadmins would need to install for me?&lt;/P&gt;
&lt;P&gt;Yes, you would need your sysadmin to do this on the host processor.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 09:34:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947611#M18699</guid>
      <dc:creator>James_C_Intel2</dc:creator>
      <dc:date>2013-05-15T09:34:49Z</dc:date>
    </item>
    <item>
      <title>Hi Fiona!</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947612#M18700</link>
      <description>&lt;P&gt;Hi Fiona!&lt;/P&gt;
&lt;P&gt;There's a small trick you can do with the &lt;STRONG&gt;&lt;A href="http://en.wikipedia.org/wiki/Binfmt_misc"&gt;binfmt_misc&lt;/A&gt;&lt;/STRONG&gt; kernel feature. You can use it to automatically launch K1OM (MIC) binaries on the MIC side when you try to execute them on the host. We call this "Execution auto-offloading". Basically you need 2 things.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A configuration string fed to &lt;STRONG&gt;/proc/sys/fs/binfmt_misc/register&amp;nbsp;&lt;/STRONG&gt;directing binaries with a specific binary fingerprint to be executed via a handler program or script (The filename of the binary is passed as an argument to this program or script).&lt;/LI&gt;
&lt;LI&gt;A handler program or script which takes the filename as the argument and executes the program on the MIC side (passing also relevant environment variables and the return value).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Here is the command to configure binfmt_misc to use a script called /usr/bin/micrun as the handler script for MIC binaries.&lt;/P&gt;
&lt;P&gt;echo ':K1OM:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb5:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/usr/bin/micrun:' &amp;gt; /proc/sys/fs/binfmt_misc/register&lt;/P&gt;
&lt;P&gt;This setting will be cleared on reboot but you can make it persistent by putting it into an init file (i.e. /etc/init.d/rc.local on RHEL -based systems).&lt;/P&gt;
&lt;P&gt;I have attached our /usr/bin/micrun handler script (had to rename it&amp;nbsp; to 'micrun.txt' to be able to attach it). It passes also MIC_* environment variables correctly and returns the return values. It assumes that the working directory on the MIC side is identical to the host-side (e.g. NFS mounted /home).&lt;/P&gt;
&lt;P&gt;Sorry if the explanation is a bit obtuse but I'm planning to make a blog post about this where it will hopefully be a bit clearer.&lt;/P&gt;
&lt;P&gt;Thanks to Jim Cownie of Intel for pointing out the binfmt_misc capability. We used to do it in a clunkier way with LD_PRELOAD but this is &lt;STRONG&gt;much&lt;/STRONG&gt; better.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2013 07:35:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947612#M18700</guid>
      <dc:creator>Olli-Pekka_L_</dc:creator>
      <dc:date>2013-05-22T07:35:34Z</dc:date>
    </item>
    <item>
      <title>Quote:Fiona R. wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947613#M18701</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Fiona R. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks Olli,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless I'm missing something obvious I don't see any micrun.txt attachment?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm guessing this would be something the sysadmins would need to install for me? I don't have root access!&lt;/P&gt;
&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fiona&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Sorry about that. I have now attached the script. As Jim mentioned, root access is needed.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2013 07:47:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-building-for-MIC-as-build-process-needs-to-execute/m-p/947613#M18701</guid>
      <dc:creator>Olli-Pekka_L_</dc:creator>
      <dc:date>2013-05-22T07:47:26Z</dc:date>
    </item>
  </channel>
</rss>

