<?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: Heterogeneous MPI thread affinity/cores? in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578972#M11610</link>
    <description>&lt;P&gt;Again, without the debug output (+ lscpu) I am not able to help you.&lt;BR /&gt;&lt;BR /&gt;You may try to define a pinning mask using the pinning simulator:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-pinning-simulator.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-pinning-simulator.html&lt;/A&gt;&lt;BR /&gt;and use the "Masklist Editing Mode" after defining your node configuration in step 2.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2024 17:28:16 GMT</pubDate>
    <dc:creator>TobiasK</dc:creator>
    <dc:date>2024-03-08T17:28:16Z</dc:date>
    <item>
      <title>Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578354#M11599</link>
      <description>&lt;P&gt;Setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have a 2 socket computer.&amp;nbsp; Each socket has an 18 core CPU.&lt;/LI&gt;&lt;LI&gt;My code runs as MPMD (There is a master rank distributing independent work to all of the other ranks.)&lt;/LI&gt;&lt;LI&gt;For this example lets say there are 500 tasks to complete.&lt;/LI&gt;&lt;LI&gt;Due to the problem definition and the amount of memory on the machine I can only run 24 ranks at one time.&amp;nbsp; This leaves 11 cores unused (36 - master - 24 = 11)&lt;/LI&gt;&lt;LI&gt;Execution of a single problem can be sped up by running on more cores so I Would like to use 10 of the 11 free cores.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is there a way for me to run 10 ranks with 2 cores, and the remaining 14 ranks with 1 core while getting the processor affinity correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I am undersubscribing the affinities for some processes get "3" cores.&amp;nbsp; &amp;nbsp;Default mpi process affinity pinning for this situation gives poor performance (the speed of the dual core jobs matches the single core speed).&amp;nbsp; Ideally the processes would lay out as 5 dual core and 7 single core ranks per socket and the jobs stay within the socket.&amp;nbsp; I quickly tried a few different setups using the -configfile option, but I couldn't figure out how to get what I wanted.&amp;nbsp; I'm controlling threads using MKL_NUM_THREADS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of my -configfile:&lt;/P&gt;&lt;P&gt;# Master&lt;/P&gt;&lt;P&gt;-n 1 ./someExecutable&lt;/P&gt;&lt;P&gt;# Workers&lt;/P&gt;&lt;P&gt;-n 10 -env MKL_NUM_THREADS 2 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 14 -env MKL_NUM_THREADS 1 ./someExecutable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also tried this:&lt;/P&gt;&lt;P&gt;# Master&lt;/P&gt;&lt;P&gt;-n 1 ./someExecutable&lt;/P&gt;&lt;P&gt;# Workers&lt;/P&gt;&lt;P&gt;-n 5 -env MKL_NUM_THREADS 2 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 7 -env MKL_NUM_THREADS 1 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 5 -env MKL_NUM_THREADS 2 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 7 -env MKL_NUM_THREADS 1 ./someExecutable&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 02:28:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578354#M11599</guid>
      <dc:creator>JeffS</dc:creator>
      <dc:date>2024-03-07T02:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578878#M11603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/306612"&gt;@JeffS&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;couple of questions here:&lt;BR /&gt;1) do you link with -qmkl=parallel and -qopenmp?&lt;BR /&gt;2) do you have some OpenMP in your code?&lt;BR /&gt;3) can you provide the output of mpirun -genv I_MPI_DEBUG=10 "your config file other arguments here"&lt;/P&gt;
&lt;P&gt;Best&lt;BR /&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 13:52:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578878#M11603</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2024-03-08T13:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578922#M11607</link>
      <description>&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;-qmkl=parallel yes.&amp;nbsp; -qopenmp no&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I don't have any OpenMP in my code.&amp;nbsp; The only "parallel" portions are MKL calls.&lt;/LI&gt;&lt;LI&gt;Unfortunately I cannot provide this.&amp;nbsp; What would I be looking for here?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 08 Mar 2024 16:01:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578922#M11607</guid>
      <dc:creator>JeffS</dc:creator>
      <dc:date>2024-03-08T16:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578956#M11608</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/306612"&gt;@JeffS&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If you cannot provide the debug output, I cannot help you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You may check with MKL_VERBOSE=1 if the MKL functions you are using are really threaded&lt;BR /&gt;You also may check with KMP_AFFINITY=verbose and OMP_DISPLAY_ENV=true where the threads are pinned.&lt;BR /&gt;(qmkl=parallel should use the OpenMP threading layer)&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 16:40:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578956#M11608</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2024-03-08T16:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578961#M11609</link>
      <description>&lt;P&gt;The MKL calls are definitely parallel and obey the MKL_NUM_THREADS environment variable.&amp;nbsp; I've used them plenty for this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am capturing thread affinity in my code and outputting it.&amp;nbsp; Some workers get 2 threads and some get 3 since the number of cores is not even divisible by the number of workers.&amp;nbsp; Is there an easy way to set the number of cores given to a worker?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I need to pin each group of workers in my config file to be constrained to a single socket?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I accomplish the below.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Total resources: 256GB total RAM, 2CPUS with 18 cores each&lt;/LI&gt;&lt;LI&gt;Resources Per Socket: 128GB and 18 cores.&lt;UL&gt;&lt;LI&gt;For the jobs running on a socket I want to make sure the memory stays under the limit and does overflow into the other sockets memory....&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Ideal setup (on each socket)&lt;UL&gt;&lt;LI&gt;5 jobs using 2 cores&lt;/LI&gt;&lt;LI&gt;7 jobs using single core&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 08 Mar 2024 16:55:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578961#M11609</guid>
      <dc:creator>JeffS</dc:creator>
      <dc:date>2024-03-08T16:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578972#M11610</link>
      <description>&lt;P&gt;Again, without the debug output (+ lscpu) I am not able to help you.&lt;BR /&gt;&lt;BR /&gt;You may try to define a pinning mask using the pinning simulator:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-pinning-simulator.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-pinning-simulator.html&lt;/A&gt;&lt;BR /&gt;and use the "Masklist Editing Mode" after defining your node configuration in step 2.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 17:28:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1578972#M11610</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2024-03-08T17:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Heterogeneous MPI thread affinity/cores?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1579070#M11611</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Interesting tool.&amp;nbsp; I hadn't seen that before.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In my original setup I was only getting 1 core per worker which is why it ran slow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The below accomplishes what I want.&amp;nbsp; Maybe not the most explicit/best way to get it done but the workers with 2 threads do run twice as fast.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Set pinning to numa.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;export I_MPI_PIN=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;export I_MPI_PIN_FOMAIN=numa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Master&lt;/P&gt;&lt;P&gt;-n 1 ./someExecutable&lt;/P&gt;&lt;P&gt;# Workers&lt;/P&gt;&lt;P&gt;-n 5 -env MKL_NUM_THREADS 2 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 7 -env MKL_NUM_THREADS 1 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 5 -env MKL_NUM_THREADS 2 ./someExecutable&lt;/P&gt;&lt;P&gt;-n 7 -env MKL_NUM_THREADS 1 ./someExecutable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 03:53:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Heterogeneous-MPI-thread-affinity-cores/m-p/1579070#M11611</guid>
      <dc:creator>JeffS</dc:creator>
      <dc:date>2024-03-09T03:53:06Z</dc:date>
    </item>
  </channel>
</rss>

