[gmx-developers] init_bonded_threading confusion
pall.szilard at gmail.com
Fri Feb 26 18:47:54 CET 2016
Mea culpa. Assertions were indeed missing and the documentation was not
entirely clear about the invalid use cases either.
Tried to correct it here:
Please leave your feedback on gerrit.
On Fri, Feb 26, 2016 at 5:31 PM, Mark Abraham <mark.j.abraham at gmail.com>
> 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.
> On Fri, 26 Feb 2016 16:37 David van der Spoel <spoel at xray.bmc.uu.se>
>> 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?
>> 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
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>> * For (un)subscribe requests visit
>> 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
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> * For (un)subscribe requests visit
> or send a mail to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gromacs.org_gmx-developers