<?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 KMP_PLACE_THREADS OpenMP affinity variable  in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965228#M22692</link>
    <description>&lt;P&gt;I posted a question on&amp;nbsp;http://software.intel.com/en-us/blogs/2013/02/15/new-kmp-place-threads-openmp-affinity-variable-in-update-2-compiler#comment-1736338&lt;/P&gt;
&lt;P&gt;I'll post it here too since it'll probably be quicker.&lt;/P&gt;
&lt;P&gt;&amp;lt;blockquote&amp;gt;&lt;BR /&gt;We want to use cores 0..29 for process 1. We want to use cores 30..60 for process 2. Here is an example of doing this:&lt;/P&gt;
&lt;P&gt;Process 1 offload environment var setup: &lt;BR /&gt;export MIC_ENV_PREFIX=PHI&lt;BR /&gt;export PHI_KMP_AFFINITY=compact&lt;BR /&gt;export PHI_KMP_PLACE_THREADS=30c,4t,0O&lt;BR /&gt;export PHI_OMP_NUM_THREADS=120&lt;BR /&gt;Process 2 offload environment var setup: &lt;BR /&gt;export MIC_ENV_PREFIX=PHI&lt;BR /&gt;export PHI_KMP_AFFINITY=compact&lt;BR /&gt;export PHI_KMP_PLACE_THREADS=30c,4t,30O&lt;BR /&gt;export PHI_OMP_NUM_THREADS=120&lt;BR /&gt;&amp;lt;/blockquote&amp;gt;&lt;/P&gt;
&lt;P&gt;How could this be done if these were MPI processes for example? If I have a program where 1 MPI process offloads to 30 of the cores and another offloads to the other 30.&lt;BR /&gt;Can I specify thread placement for each MPI process at runtime?&lt;BR /&gt;Or is there an API where I can set it at compile time?&lt;/P&gt;</description>
    <pubDate>Sun, 19 May 2013 13:03:39 GMT</pubDate>
    <dc:creator>james_B_8</dc:creator>
    <dc:date>2013-05-19T13:03:39Z</dc:date>
    <item>
      <title>KMP_PLACE_THREADS OpenMP affinity variable</title>
      <link>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965228#M22692</link>
      <description>&lt;P&gt;I posted a question on&amp;nbsp;http://software.intel.com/en-us/blogs/2013/02/15/new-kmp-place-threads-openmp-affinity-variable-in-update-2-compiler#comment-1736338&lt;/P&gt;
&lt;P&gt;I'll post it here too since it'll probably be quicker.&lt;/P&gt;
&lt;P&gt;&amp;lt;blockquote&amp;gt;&lt;BR /&gt;We want to use cores 0..29 for process 1. We want to use cores 30..60 for process 2. Here is an example of doing this:&lt;/P&gt;
&lt;P&gt;Process 1 offload environment var setup: &lt;BR /&gt;export MIC_ENV_PREFIX=PHI&lt;BR /&gt;export PHI_KMP_AFFINITY=compact&lt;BR /&gt;export PHI_KMP_PLACE_THREADS=30c,4t,0O&lt;BR /&gt;export PHI_OMP_NUM_THREADS=120&lt;BR /&gt;Process 2 offload environment var setup: &lt;BR /&gt;export MIC_ENV_PREFIX=PHI&lt;BR /&gt;export PHI_KMP_AFFINITY=compact&lt;BR /&gt;export PHI_KMP_PLACE_THREADS=30c,4t,30O&lt;BR /&gt;export PHI_OMP_NUM_THREADS=120&lt;BR /&gt;&amp;lt;/blockquote&amp;gt;&lt;/P&gt;
&lt;P&gt;How could this be done if these were MPI processes for example? If I have a program where 1 MPI process offloads to 30 of the cores and another offloads to the other 30.&lt;BR /&gt;Can I specify thread placement for each MPI process at runtime?&lt;BR /&gt;Or is there an API where I can set it at compile time?&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2013 13:03:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965228#M22692</guid>
      <dc:creator>james_B_8</dc:creator>
      <dc:date>2013-05-19T13:03:39Z</dc:date>
    </item>
    <item>
      <title>I posted a hint in the other</title>
      <link>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965229#M22693</link>
      <description>&lt;P&gt;I posted a hint in the other thread&amp;nbsp;&lt;A href="http://software.intel.com/en-us/blogs/2013/02/15/new-kmp-place-threads-openmp-affinity-variable-in-update-2-compiler#comment-1736338"&gt;http://software.intel.com/en-us/blogs/2013/02/15/new-kmp-place-threads-o...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(I won't say an answer, just a suggestion of the question you're really trying to ask...)&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 16:41:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965229#M22693</guid>
      <dc:creator>James_C_Intel2</dc:creator>
      <dc:date>2013-05-20T16:41:06Z</dc:date>
    </item>
    <item>
      <title>I didnt see a hint from James</title>
      <link>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965230#M22694</link>
      <description>&lt;P&gt;I didnt see a hint from James, but yes,at least with Intel MPI, each MPI rank can be specified individually with its own KMP_PLACE_THREADS setting (usually just an origin translation, if each rank has the same number of threads).&lt;/P&gt;
&lt;P&gt;The case where this is most needed is the one where these MPI ranks are running on host and you want each to reserve a group of cores on MIC for use in offload mode (using the MIC_ENV_PREFIX option as you said).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the case where MPI is running individual ranks under the control of Intel MPI on the MIC, the KMP_AFFINITY options such as balanced will work, with each taking its core assignments according to I_MPI_PIN_DOMAIN (and MIC_ENV_PREFIX doesn't apply).&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 19:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965230#M22694</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-05-20T19:31:00Z</dc:date>
    </item>
    <item>
      <title>Another question. Can the MIC</title>
      <link>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965231#M22695</link>
      <description>&lt;P&gt;Another question. Can the MIC handle multiple offloads from different processes like that or do they need to be synchronised somehow (eg MPI)?&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2013 14:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965231#M22695</guid>
      <dc:creator>james_B_8</dc:creator>
      <dc:date>2013-05-31T14:50:00Z</dc:date>
    </item>
    <item>
      <title>You need some way of</title>
      <link>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965232#M22696</link>
      <description>&lt;P&gt;You need some way of specifying distinct affinity groups for each offload task.&amp;nbsp; Running MPI on the host with each rank given a distinct MIC_KMP_PLACE_THREADS setting is a documented way of doing it.&amp;nbsp; I suppose you could come up with other ways, such as using calls to the OpenMP library in the MIC offload tasks.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2013 16:23:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/KMP-PLACE-THREADS-OpenMP-affinity-variable/m-p/965232#M22696</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-05-31T16:23:06Z</dc:date>
    </item>
  </channel>
</rss>

