<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div><div>Hi Pavan,<br></div>thank you for your answer.<br></div>I get this output:<br><div><br>larcher@na75:> HYDRA_TOPO_DEBUG=1  mpiexec -n 8 -bind-to hwthread -map-by core /bin/true | sort<br>process 0 binding: 1 0 0 0 0 0 0 0 <br>process 1 binding: 0 1 0 0 0 0 0 0 <br>process 2 binding: 0 0 1 0 0 0 0 0 <br>process 3 binding: 0 0 0 1 0 0 0 0 <br>process 4 binding: 0 0 0 0 1 0 0 0 <br>process 5 binding: 0 0 0 0 0 1 0 0 <br>process 6 binding: 0 0 0 0 0 0 1 0 <br>process 7 binding: 0 0 0 0 0 0 0 1 <br><br>larcher@na75:> HYDRA_TOPO_DEBUG=1  mpiexec -n 4 -bind-to hwthread -map-by core /bin/true | sort<br>process 0 binding: 1 0 0 0 0 0 0 0 <br>process 1 binding: 0 1 0 0 0 0 0 0 <br>process 2 binding: 0 0 1 0 0 0 0 0 <br>process 3 binding: 0 0 0 1 0 0 0 0 <br><br></div><div>which is exactly what I need, thank you !</div><div>Also passing -bind-to core:1 is suitable.<br></div><div>Best,<br></div><div><br></div><div>Aurelien<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 7:28 PM, Balaji, Pavan <span dir="ltr"><<a href="mailto:balaji@anl.gov" target="_blank">balaji@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Try this:<br>
<br>
HYDRA_TOPO_DEBUG=1  mpiexec -n 8 -bind-to hwthread -map-by core /bin/true | sort<br>
<span class="HOEnZb"><font color="#888888"><br>
  -- Pavan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Apr 1, 2015, at 12:26 PM, Balaji, Pavan <<a href="mailto:balaji@anl.gov">balaji@anl.gov</a>> wrote:<br>
><br>
><br>
> This is not linux specific.  It's following whatever order the OS gives it.  You might want to look at the -map-by option for better controlling the processes in the way you are looking for.<br>
><br>
>  -- Pavan<br>
><br>
>> On Apr 1, 2015, at 11:47 AM, Aurélien Larcher <<a href="mailto:aurelien.larcher@gmail.com">aurelien.larcher@gmail.com</a>> wrote:<br>
>><br>
>> Hi Rajeev,<br>
>> thank you for the pointer, actually this page leads me to another question.<br>
>> What is exactly the policy for binding by hwthreads ?<br>
>><br>
>> I can see that:<br>
>><br>
>> larcher@na75:> HYDRA_TOPO_DEBUG=1  mpiexec -n 8 -bind-to hwthread /bin/true | sort<br>
>> process 0 binding: 1 0 0 0 0 0 0 0<br>
>> process 1 binding: 0 0 0 0 1 0 0 0<br>
>> process 2 binding: 0 1 0 0 0 0 0 0<br>
>> process 3 binding: 0 0 0 0 0 1 0 0<br>
>> process 4 binding: 0 0 1 0 0 0 0 0<br>
>> process 5 binding: 0 0 0 0 0 0 1 0<br>
>> process 6 binding: 0 0 0 1 0 0 0 0<br>
>> process 7 binding: 0 0 0 0 0 0 0 1<br>
>><br>
>> Which seems unfortunate because since the processor is a quad core with hyperthreading the same physical core will get the first two threads.<br>
>><br>
>> larcher@na75:> psrinfo -pv<br>
>> The physical processor has 4 cores and 8 virtual processors (0-7)<br>
>>  The core has 2 virtual processors (0 4)<br>
>>  The core has 2 virtual processors (1 5)<br>
>>  The core has 2 virtual processors (2 6)<br>
>>  The core has 2 virtual processors (3 7)<br>
>>    x86 (GenuineIntel 206A7 family 6 model 42 step 7 clock 3392 MHz)<br>
>>      Intel(r) Core(tm) i7-2600 CPU @ 3.40GHz<br>
>><br>
>><br>
>> This is confirmed by:<br>
>><br>
>> HYDRA_TOPO_DEBUG=1  mpiexec -n 4 -bind-to hwthread /bin/true | sort<br>
>> process 0 binding: 1 0 0 0 0 0 0 0<br>
>> process 1 binding: 0 0 0 0 1 0 0 0<br>
>> process 2 binding: 0 1 0 0 0 0 0 0<br>
>> process 3 binding: 0 0 0 0 0 1 0 0<br>
>><br>
>> Is it due to a Linux-specific numbering of logical cores ?<br>
>><br>
>> Thank you,<br>
>><br>
>> Aurelien<br>
>><br>
>><br>
>><br>
>><br>
>> On Wed, Apr 1, 2015 at 6:18 PM, Thakur, Rajeev <<a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a>> wrote:<br>
>> Yes, see <a href="https://wiki.mpich.org/mpich/index.php/Using_the_Hydra_Process_Manager#Process-core_Binding" target="_blank">https://wiki.mpich.org/mpich/index.php/Using_the_Hydra_Process_Manager#Process-core_Binding</a><br>
>><br>
>> Rajeev<br>
>><br>
>><br>
>> On Apr 1, 2015, at 11:14 AM, Aurélien Larcher <<a href="mailto:aurelien.larcher@gmail.com">aurelien.larcher@gmail.com</a>><br>
>> wrote:<br>
>><br>
>>> Hi,<br>
>>> running parallel code on my workstation (with OpenIndiana) I discovered that MPI processes were migrated on a regular basis from one core to another.<br>
>>><br>
>>> On SunOS systems the command 'pbind' allows binding a process to a specific core.<br>
>>> So I am wondering if binding automatically each process to the next available core is supported directly from MPICH ?<br>
>>><br>
>>> Best regards<br>
>>><br>
>>> Aurelien<br>
>>><br>
>>> --<br>
>>> -------------------------------------------------------------------------------<br>
>>> LARCHER Aurélien          | KTH, School of Computer Science and Communication<br>
>>> Work: <a href="tel:%2B46%20%280%29%208%20790%2071%2042" value="+4687907142">+46 (0) 8 790 71 42</a> | Lindstedtsvägen 5, Plan 4, 100 44 Stockholm, SWEDEN<br>
>>> -------------------------------------------------------------------------------<br>
>>> _______________________________________________<br>
>>> discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
>>> To manage subscription options or unsubscribe:<br>
>>> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>><br>
>> _______________________________________________<br>
>> discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
>> To manage subscription options or unsubscribe:<br>
>> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> -------------------------------------------------------------------------------<br>
>> LARCHER Aurélien          | KTH, School of Computer Science and Communication<br>
>> Work: <a href="tel:%2B46%20%280%29%208%20790%2071%2042" value="+4687907142">+46 (0) 8 790 71 42</a> | Lindstedtsvägen 5, Plan 4, 100 44 Stockholm, SWEDEN<br>
>> -------------------------------------------------------------------------------<br>
>> _______________________________________________<br>
>> discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
>> To manage subscription options or unsubscribe:<br>
>> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
><br>
> --<br>
> Pavan Balaji  ✉️<br>
> <a href="http://www.mcs.anl.gov/~balaji" target="_blank">http://www.mcs.anl.gov/~balaji</a><br>
><br>
> _______________________________________________<br>
> discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
--<br>
Pavan Balaji  ✉️<br>
<a href="http://www.mcs.anl.gov/~balaji" target="_blank">http://www.mcs.anl.gov/~balaji</a><br>
<br>
_______________________________________________<br>
discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><font style="font-family:courier new,monospace" size="1">-------------------------------------------------------------------------------<br>LARCHER Aurélien          | KTH, School of Computer Science and Communication<br>
Work: <a value="+4687907142">+46 (0) 8 790 71 42</a> | Lindstedtsvägen 5, Plan <font size="1">4<font size="1">,</font></font> 100 44 Stockholm, SWEDEN<br>-------------------------------------------------------------------------------<br></font></div></div>
</div>