[gmx-developers] VsiteN in parallel problem

Berk Hess hess at kth.se
Mon Aug 18 22:11:44 CEST 2014

On 08/18/2014 10:01 PM, David van der Spoel wrote:
> On 2014-08-18 22:03, Berk Hess wrote:
>> On 08/18/2014 09:54 PM, David van der Spoel wrote:
>>> On 2014-08-18 21:41, Berk Hess wrote:
>>>> Hi,
>>>> I don't understand what the issue is exactly.
>>>> When you use OpenMP only one thread creates the vsite, but after a
>>>> thread barrier (which is implicitly present when exiting an OpenMP
>>>> parallel region) after all threads will have the new vsite position,
>>>> since they all share the same memory.
>>> Thanks, I was looking for the communication code but of course it is
>>> not needed. It seems the problem is in the initiation of thread
>>> structures specific for vsiteN. There are tons of if (ftype != VSITEN)
>>> in the code. I'll figure it out.
>> But do I understand correctly that there is a bug with vsiteN and OpenMP
>> in 4.6 and 5.0 then?
> That could well be. I will try to investigate that tomorrow with a 
> simpler test system.
I had a quick look at the code and it could be that line 1966 should not be:
inc = iat[i];
inc = iat[i]*3;

>> Berk
>>>> Cheers,
>>>> Berk
>>>> On 08/18/2014 05:23 PM, David van der Spoel wrote:
>>>>> Hi,
>>>>> I'm working on a branch where I have one vsiteN per amino acid in my
>>>>> protein, and all vsites interact with each other. When running mdrun
>>>>> using OpenMP the vsite positions do not get created on all threads,
>>>>> despite listing the interaction type as a bonded type in ifunc.c.
>>>>> Before diving into domain decomposition code I wonder whether there
>>>>> may be a quick workaround?

More information about the gromacs.org_gmx-developers mailing list