[gmx-developers] init_bonded_threading confusion

Szilárd Páll pall.szilard at gmail.com
Fri Feb 26 18:47:54 CET 2016


Hi,

Mea culpa. Assertions were indeed missing and the documentation was not
entirely clear about the invalid use cases either.
Tried to correct it here:
https://gerrit.gromacs.org/#/c/5683/

Please leave your feedback on gerrit.

Cheers,

--
Szilárd

On Fri, Feb 26, 2016 at 5:31 PM, Mark Abraham <mark.j.abraham at gmail.com>
wrote:

> Hi,
>
> Seems like your code didn'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.
>
> Mark
>
> On Fri, 26 Feb 2016 16:37 David van der Spoel <spoel at xray.bmc.uu.se>
> wrote:
>
>> Hi,
>>
>> I'm (deep)linking my code to gromacs (so could have forgotten some
>> initialization). Running on Apple with clang, so no OpenMP.
>>
>> Therefore when in the mentioned routine we have:
>>      /* These thread local data structures are used for bondeds only */
>>      bt->nthreads = gmx_omp_nthreads_get(emntBonded);
>>
>> it returns 0, not surprising, or is it?
>> Down the road in listed-forces.cpp we have
>>
>> #pragma omp parallel for num_threads(bt->nthreads) schedule(static)
>>      for (thread = 0; thread < bt->nthreads; thread++)
>>      {
>>         // Compute all the bonded forces and energies
>>
>> However, since the number of threads is zero, no bonded forces are
>> computed. Am I missing something that is going on under the hood?
>>
>> Cheers,
>> --
>> David van der Spoel, Ph.D., Professor of Biology
>> Dept. of Cell & Molec. Biol., Uppsala University.
>> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
>> spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
>> --
>> Gromacs Developers mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
>> posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
>> or send a mail to gmx-developers-request at gromacs.org.
>>
>
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20160226/d30802d9/attachment-0002.html>


More information about the gromacs.org_gmx-developers mailing list