<?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 If you're looking for an in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958722#M3131</link>
    <description>&lt;P&gt;If you're looking for an answer which is independent of which OS, MPI and threading model is used in the application, I think you're out of luck. &amp;nbsp;Your reference to numactl would seem to indicate linux with pthreads, in which case you could set up a separate taskset selection for each MPI process, giving each process a selection of hardware contexts, with an effect similar to what you would get by setting KMP_AFFINITY for each process when libiomp is in use.&lt;/P&gt;

&lt;P&gt;I don't see you explaining why you like numactl for a single-process application but not for multiple processes. &amp;nbsp;I suppose numactl or taskset may be applicable only for MPI_THREAD_FUNNELED model, but you didn't say explicitly that you have something different in mind.&lt;/P&gt;

&lt;P&gt;I guess you may not have meant to ask for an equivalent to KMP_AFFINITY which works for any pthreads application. &amp;nbsp;Standard equivalents to KMP_AFFINITY are OMP_PROC_BIND and OMP_PLACES, but I'm sure you could find applications built not so long ago against libraries not sufficiently up to date to support them.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Apr 2014 14:13:03 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2014-04-09T14:13:03Z</dc:date>
    <item>
      <title>Setting affinity for third party applications that create threads</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958717#M3126</link>
      <description>&lt;P&gt;Hope this is the correct forum to ask this question.&lt;/P&gt;

&lt;P&gt;We can use KMP_AFFINITY and associated infrastructure to set affinity for threads spawned by applications we've developed. And we can use numactl to bind a single-process third-party application to a core. What's available to bind threads spawned by a third-party process to a particular core? We can set what's effectively a CPU set using numactl for a third-party application. The threads spawned by a third-party process will stay within this CPU set but appear to move around between cores. I would be grateful for pointers on how we can bind threads spawned by a third-party process to a particular core&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 02:24:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958717#M3126</guid>
      <dc:creator>dehvidc1</dc:creator>
      <dc:date>2014-03-25T02:24:16Z</dc:date>
    </item>
    <item>
      <title>hello David,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958718#M3127</link>
      <description>&lt;P&gt;hello David,&lt;/P&gt;

&lt;P&gt;you can use affinity API to pin 3rd party threads to cores:&lt;/P&gt;

&lt;P&gt;sched_setaffinity() for linux,&amp;nbsp;cpuset_setaffinity() for FreeBSD or&amp;nbsp;SetThreadGroupAffinity() for windows.&lt;/P&gt;

&lt;P&gt;--Vladimir&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 09:25:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958718#M3127</guid>
      <dc:creator>Vladimir_P_1234567890</dc:creator>
      <dc:date>2014-04-08T09:25:28Z</dc:date>
    </item>
    <item>
      <title>Do you mean there is a</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958719#M3128</link>
      <description>&lt;P&gt;Do you mean there is a requirement not to link against libgomp or libiomp? &amp;nbsp;taskset may be of use&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 09:47:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958719#M3128</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-04-08T09:47:38Z</dc:date>
    </item>
    <item>
      <title>Thanks for the replies. My</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958720#M3129</link>
      <description>&lt;P&gt;Thanks for the replies. My problem is how I can set affinity to cores with third-party applications. These are applications for which I don't have the code so I can't compile and link them.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is there any way to fix a thread to a core&amp;nbsp;for threads spawned by a third-party application for which the source code is unavailable?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 23:50:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958720#M3129</guid>
      <dc:creator>dehvidc1</dc:creator>
      <dc:date>2014-04-08T23:50:05Z</dc:date>
    </item>
    <item>
      <title>From outside of a process,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958721#M3130</link>
      <description>&lt;P&gt;From outside of a process, you're really only going to be able to control the affinity of the entire process.&amp;nbsp; Depending on how the application spawns its threads, you &lt;EM&gt;&lt;STRONG&gt;*might* &lt;/STRONG&gt;&lt;/EM&gt;be able to bind the process to the desired core, let the application spawn the thread, and then move the main process.&amp;nbsp; I don't really expect that to work, but it might be worth exploring if you absolutely have to pin the applications threads to individual cores.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2014 13:27:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958721#M3130</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-04-09T13:27:10Z</dc:date>
    </item>
    <item>
      <title>If you're looking for an</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958722#M3131</link>
      <description>&lt;P&gt;If you're looking for an answer which is independent of which OS, MPI and threading model is used in the application, I think you're out of luck. &amp;nbsp;Your reference to numactl would seem to indicate linux with pthreads, in which case you could set up a separate taskset selection for each MPI process, giving each process a selection of hardware contexts, with an effect similar to what you would get by setting KMP_AFFINITY for each process when libiomp is in use.&lt;/P&gt;

&lt;P&gt;I don't see you explaining why you like numactl for a single-process application but not for multiple processes. &amp;nbsp;I suppose numactl or taskset may be applicable only for MPI_THREAD_FUNNELED model, but you didn't say explicitly that you have something different in mind.&lt;/P&gt;

&lt;P&gt;I guess you may not have meant to ask for an equivalent to KMP_AFFINITY which works for any pthreads application. &amp;nbsp;Standard equivalents to KMP_AFFINITY are OMP_PROC_BIND and OMP_PLACES, but I'm sure you could find applications built not so long ago against libraries not sufficiently up to date to support them.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2014 14:13:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Setting-affinity-for-third-party-applications-that-create/m-p/958722#M3131</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-04-09T14:13:03Z</dc:date>
    </item>
  </channel>
</rss>

