Re: [AMBER-Developers] hook for modify of frc() array

From: Josh Berryman <the.real.josh.berryman.gmail.com>
Date: Tue, 3 May 2011 15:57:33 +0200

Forget the bug-help-request ... parallelisation was just exposing something
that I put in a while ago. Any hints for "plugin" type activity that
modifies forces and coordinates are still welcome though.

Josh

On Tue, May 3, 2011 at 2:58 PM, Josh Berryman <
the.real.josh.berryman.gmail.com> wrote:

> Correction: the stub function to reproduce the problem should read:
>
> c_ssti_forces( f, istart, iend ){
>
> for(int i = *istart - 1; i < *iend; i++){
> f[i * 3] *= 0.5;
> f[i * 3 + 1] *= 0.5;
> f[i * 3 + 2] *= 0.5;
> }
> return();
> }
>
>
> On Tue, May 3, 2011 at 2:47 PM, Josh Berryman <
> the.real.josh.berryman.gmail.com> wrote:
>
>> Hello Devs, I am writing a module which plugs into the amber code in the
>> following way:
>>
>>
>> I runmd I have this code:
>>
>> call force(xx,ix,ih,ipairs,x,f,ener,ener%vir, &
>> xx(l96),xx(l97),xx(l98),xx(l99), qsetup, &
>> do_list_update,nstep) !call force() in the normal place
>>
>> call c_ssti_forces( x, f, .... ) !modify the forces for nefarious
>> purposes
>>
>> ... the c_ssti_forces() function modifies the interactions; it is part of
>> a TI thing that I am trying out. In serial, this very simple scheme for
>> modifying the forces seems to work; but for more than one processor; I have
>> problems. The most simple function for c_ssti_forces() which gives
>> divergence is:
>>
>> c_ssti_forces( f, istart, iend ){
>>
>> for(int i = istart - 1; i < iend; i++){
>> f[istart*3] *= 0.5;
>> f[istart*3] + 1 *= 0.5;
>> f[istart*3] + 2 *= 0.5;
>> }
>> return();
>> }
>>
>> The behaviour is odd: for serial, with istart = 1 and iend = natoms; this
>> stub function just damps the dynamics a bit, as you might hope. For
>> parallel (with various valued of istart and iend fished out of the code, eg
>> based on iparpt in the fsum function) the temperature blows up and the
>> simulation explodes. What is going on? How do I alter forces in a parallel
>> run? I get the same behaviour with the thermostat turned off or on.
>>
>> Josh
>>
>
>
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue May 03 2011 - 07:00:02 PDT
Custom Search