<div dir="ltr">Hi,<br><br><div>Node sharing cannot be automagically supported, because there&#39;s no &quot;reliable&quot; source of information except the user. This is nothing new (e.g. <a href="http://www.gromacs.org/Documentation/Acceleration_and_parallelization#Pinning_threads_to_physical_cores">http://www.gromacs.org/Documentation/Acceleration_and_parallelization#Pinning_threads_to_physical_cores</a>). mdrun can&#39;t know whether omp_get_num_procs or OMP_NUM_THREADS is more reliable in the general case (naturally, every job scheduler is different, and we can&#39;t even assume that there is a job scheduler who might do it right, e.g. the case of users sharing an in-house machine). However, if only omp_get_num_procs is set, then maybe we can use that rather than assume that the number of hardware threads is appropriate to use? We&#39;d still report the difference to the user.</div><div><br></div><div>Agree with Berk that a scheduler that only used this mechanism to declare the number of available physical cores would be flawed, e.g. consider a pthreads or TBB code.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 4, 2015 at 1:46 PM David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04/06/15 12:51, Berk Hess wrote:<br>
&gt; PS There is something strange on that machine. If Gromacs detects 16<br>
&gt; threads, omp_get_num_procs should return 16, not 8.<br>
Nope.<br>
The queue system allocates 8 cores out of 16 physical cores to my job.<br>
GROMACS see both values, reports a conflict, and follows the hardware<br>
rather than OpenMP settings. I would think it should do the reverse.<br>
<br>
&gt;<br>
&gt; Berk<br>
&gt;<br>
&gt; On 2015-06-04 12:49, Berk Hess wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; I don&#39;t think anything changed in the master branch.<br>
&gt;&gt;<br>
&gt;&gt; But we do adhere to the OpenMP environment. The value reported in the<br>
&gt;&gt; message comes from omp_get_num_procs, which should be a report about<br>
&gt;&gt; the hardware available. OMP_NUM_THREADS sets the number of OpenMP<br>
&gt;&gt; threads to use, that is respected.<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;&gt; Berk<br>
&gt;&gt;<br>
&gt;&gt; On 2015-06-04 11:21, David van der Spoel wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; why does GROMACS in the master branch not adhere to the OpenMP<br>
&gt;&gt;&gt; environment?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Number of hardware threads detected (16) does not match the number<br>
&gt;&gt;&gt; reported by OpenMP (8).<br>
&gt;&gt;&gt; Consider setting the launch configuration manually!<br>
&gt;&gt;&gt; Reading file md.tpr, VERSION 5.1-beta1-dev-20150603-99a1e1f-dirty<br>
&gt;&gt;&gt; (single precision)<br>
&gt;&gt;&gt; Changing nstlist from 10 to 40, rlist from 1.1 to 1.1<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Using 1 MPI process<br>
&gt;&gt;&gt; Using 16 OpenMP threads<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;<br>
<br>
<br>
--<br>
David van der Spoel, Ph.D., Professor of Biology<br>
Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.<br>
<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div>