<?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 Re:Intel MPI pins processes but does not set the affinity mask on a Windows system in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1603528#M11740</link>
    <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is there any update?&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 04 Jun 2024 04:37:50 GMT</pubDate>
    <dc:creator>Mahan</dc:creator>
    <dc:date>2024-06-04T04:37:50Z</dc:date>
    <item>
      <title>Intel MPI pins processes but does not set the affinity mask on a Windows system</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1599794#M11719</link>
      <description>&lt;P&gt;Intel MPI 2021.8 was used to run a 6 process local parallel job on a Windows system with a single 8 core CPU using the following environment variables:&lt;/P&gt;&lt;P&gt;I_MPI_DEBUG=4&lt;BR /&gt;I_MPI_PIN_PROCESSOR_LIST=0,1,2,3,4,5&lt;/P&gt;&lt;P&gt;Debug output shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;[0] MPI startup(): Rank    Pid      Node name        Pin cpu
[0] MPI startup(): 0       33620    hostname         0
[0] MPI startup(): 1       27032    hostname         1
[0] MPI startup(): 2       25416    hostname         2
[0] MPI startup(): 3       29352    hostname         3
[0] MPI startup(): 4       6596     hostname         4
[0] MPI startup(): 5       9416     hostname         5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is clear that the processes are being correctly pinned, as the load on the first 6 cores rises to 100% and the remaining 2 cores are virtually unloaded.&lt;/P&gt;&lt;P&gt;However, if the affinity mask is viewed in 'Process Explorer', or the affinity mask is obtained in the application using the Windows API function GetProcessAffinityMask(), then the affinity mask is 255 for all processes (i.e. apparently allowed to run on all 8 cores). This is unexpected.&lt;/P&gt;&lt;P&gt;If the same test is repeated with Microsoft MPI, with equivalent affinity settings (MPIEXEC_AFFINITY=2), then the affinity mask is 1,2,4,8,16,32 as expected.&lt;/P&gt;&lt;P&gt;Similarly if the test is repeated with Intel MPI on a Linux, the affinity mask is again as expected.&lt;/P&gt;&lt;P&gt;How does Intel MPI pin the processes on Windows and why does the affinity mask not reflect the process pinning? Is there an alternative way way to determine the affinity of each process programmatically from the application?&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 13:18:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1599794#M11719</guid>
      <dc:creator>ManOfKent</dc:creator>
      <dc:date>2024-05-22T13:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MPI pins processes but does not set the affinity mask on a Windows system</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1599825#M11720</link>
      <description>&lt;P&gt;After some more experimentation, I think I can answer my own question. I found that the affinity mask corresponding to the pinning applied by Intel can be obtained by using the Windows API function GetThreadGroupAffinity(). It looks as if Intel MPI sets the thread affinity rather than the process affinity.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 15:40:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1599825#M11720</guid>
      <dc:creator>ManOfKent</dc:creator>
      <dc:date>2024-05-22T15:40:28Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MPI pins processes but does not set the affinity mask on a Windows system</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1600071#M11722</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Intel MPI Library on Windows uses a different approach for process pinning than Linux. On Windows, Intel MPI Library does not set the process affinity mask directly. Instead, it uses the Windows Job Object feature to manage and control processes' CPU affinity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Job Object feature allows for more flexible and dynamic CPU affinity management, which is particularly useful in scenarios where processes may need to be migrated or rescheduled during their execution. By using Job Objects, Intel MPI Library can ensure that processes remain pinned to their assigned CPUs even if the system's CPU topology changes or if processes are rescheduled by the operating system.&lt;/P&gt;&lt;P&gt;This approach explains why the GetProcessAffinityMask() function returns a mask that appears to allow the process to run on all available CPUs, even though the processes are effectively pinned to specific CPUs by the Intel MPI Library's Job Object management.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2024 02:18:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1600071#M11722</guid>
      <dc:creator>Mahan</dc:creator>
      <dc:date>2024-06-10T02:18:52Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MPI pins processes but does not set the affinity mask on a Windows system</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1601807#M11738</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please let me know if the last answer resolves the issue.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 May 2024 03:59:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1601807#M11738</guid>
      <dc:creator>Mahan</dc:creator>
      <dc:date>2024-05-29T03:59:58Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MPI pins processes but does not set the affinity mask on a Windows system</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1603528#M11740</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is there any update?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Jun 2024 04:37:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1603528#M11740</guid>
      <dc:creator>Mahan</dc:creator>
      <dc:date>2024-06-04T04:37:50Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MPI pins processes but does not set the affinity mask on a Windows system</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1605174#M11745</link>
      <description>&lt;P&gt;I Chris,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am closing this thread.&lt;/P&gt;&lt;P&gt;Please open a separate thread if you face any more issues.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2024 02:17:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Intel-MPI-pins-processes-but-does-not-set-the-affinity-mask-on-a/m-p/1605174#M11745</guid>
      <dc:creator>Mahan</dc:creator>
      <dc:date>2024-06-10T02:17:28Z</dc:date>
    </item>
  </channel>
</rss>

