<div dir="ltr">Hi,<div><br></div><div>Mea culpa. Assertions were indeed missing and the documentation was not entirely clear about the invalid use cases either.</div><div>Tried to correct it here:</div><div><a href="https://gerrit.gromacs.org/#/c/5683/">https://gerrit.gromacs.org/#/c/5683/</a><br></div><div><br></div><div>Please leave your feedback on gerrit.</div><div><br></div><div>Cheers,</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">--<br>Szilárd</div></div>
<br><div class="gmail_quote">On Fri, Feb 26, 2016 at 5:31 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi,</p>
<p dir="ltr">Seems like your code didn&#39;t call the corresponding init routine. Whoever implemented this has commented that the behaviour of returning zero should provoke errors, but clearly that is not good enough. Since it is a coding error to call the nthreads_get routine before initialising that module, it seems like an assertion should fire.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">Mark</p></font></span><div class="HOEnZb"><div class="h5">
<br><div class="gmail_quote"><div dir="ltr">On Fri, 26 Feb 2016 16:37 David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">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">Hi,<br>
<br>
I&#39;m (deep)linking my code to gromacs (so could have forgotten some<br>
initialization). Running on Apple with clang, so no OpenMP.<br>
<br>
Therefore when in the mentioned routine we have:<br>
     /* These thread local data structures are used for bondeds only */<br>
     bt-&gt;nthreads = gmx_omp_nthreads_get(emntBonded);<br>
<br>
it returns 0, not surprising, or is it?<br>
Down the road in listed-forces.cpp we have<br>
<br>
#pragma omp parallel for num_threads(bt-&gt;nthreads) schedule(static)<br>
     for (thread = 0; thread &lt; bt-&gt;nthreads; thread++)<br>
     {<br>
        // Compute all the bonded forces and energies<br>
<br>
However, since the number of threads is zero, no bonded forces are<br>
computed. Am I missing something that is going on under the hood?<br>
<br>
Cheers,<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:  <a href="tel:%2B46184714205" value="+46184714205" target="_blank">+46184714205</a>.<br>
<a href="mailto:spoel@xray.bmc.uu.se" target="_blank">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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>
</div></div><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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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">gmx-developers-request@gromacs.org</a>.<br></blockquote></div><br></div>