Re: [AMBER] same simulation using different random seeds on GPU

From: Jason Swails <jason.swails.gmail.com>
Date: Sun, 26 Feb 2012 13:09:18 -0500

On Sun, Feb 26, 2012 at 5:09 AM, Oliver Kuhn <oak.amber.googlemail.com>wrote:

> Hi again,
>
> Just to add one information to this thread.
> The difference between CPU and GPU I observed did not only stem from
> rounding differences.
> In my CPU simulations I had used a heatup phase and tempi was therefore
> set, - I did not realize that when I posted my problem.
> (I guess and hope the differences from initial velocities are much larger
> than those from rounding errors.)
>

But you set irest=0 and ntx=1 in your input file. With those settings,
velocities are _not_ read from the restart file and tempi is set to 0
(meaning that no random velocities are set, as Ross pointed out).

Also, rounding differences between CPU and GPU versions (since the hardware
is different) will eventually lead to divergent trajectories, and this is
not a bad thing.

I'm not sure if I completely understand exactly what you've done (for
instance, I'm not sure what simulations are being started with what
structures, and what files are the same, supposed to be the same, and are
not the same, etc.), so I just offered some potentially helpful
observations.

HTH,
Jason


> Oliver
>
>
> 2012/2/24 Ross Walker <ross.rosswalker.co.uk>
>
> > Hi Oliver,
> >
> > You are not specifying tempi. Thus it defaults to 0.0. Hence there are no
> > initial velocities and therefore the random number generator is not used
> > (with ntt=1). Hence the value of ig will have no effect and your
> > simulations
> > will therefore be totally deterministic as you observe. Any differences
> you
> > see with the CPU version are just the result of divergence caused by
> > rounding differences during summation which the GPU code is not affected
> > by.
> >
> > All the best
> > Ross
> >
> > > -----Original Message-----
> > > From: Oliver Kuhn [mailto:oak.amber.googlemail.com]
> > > Sent: Friday, February 24, 2012 8:37 AM
> > > To: AMBER Mailing List
> > > Subject: [AMBER] same simulation using different random seeds on GPU
> > >
> > > Hi.
> > >
> > > I want to use differing initial random velocities for simulations
> > > running
> > > on GPU.
> > > That has always been working on CPU, but on the GPU I get exactly the
> > > same
> > > simulation.
> > >
> > > For example, input 1 is:
> > >
> > > production simulation (NPT) - 2 ns
> > > &cntrl
> > > ig=1,
> > > irest=0,ntx=1,
> > > nstlim=1000000,dt=0.002,
> > > temp0=300.0,ntt=1,tautp=1.0,
> > > ntc=2,ntf=2,
> > > cut=9,
> > > ntpr=500,ntwx=500,ntwv=0,ntwe=500,iwrap=1,
> > > ntb=2,ntp=1,pres0=1.0,taup=1.0,
> > > ntr=0
> > > /
> > >
> > > and another input has ig=41
> > > giving me same simulations!?
> > >
> > > As I googled, I found a comment from Ross that GPU uses different
> > > random
> > > number generators.
> > > I'm quite sure he does not mean also different syntax in using it.
> > > Has anyone experienced similar problem and can help me?
> > >
> > > Greets,
> > > Oliver
> > >
> > > --
> > > Oliver Kuhn, Department of Bioinformatics,
> > > Center for Medical Biotechnology, University of Duisburg-Essen,
> > > Universitätsstr. 1-5, 45141 Essen, Germany
> > > phone +49 201 183-3121, oliver.kuhn.uni-due.de
> > > _______________________________________________
> > > AMBER mailing list
> > > AMBER.ambermd.org
> > > http://lists.ambermd.org/mailman/listinfo/amber
> >
> >
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber
> >
>
>
>
> --
> Oliver Kuhn, Department of Bioinformatics,
> Center for Medical Biotechnology, University of Duisburg-Essen,
> Universitätsstr. 1-5, 45141 Essen, Germany
> phone +49 201 183-3121, oliver.kuhn.uni-due.de
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Feb 26 2012 - 10:30:02 PST
Custom Search