[gmx-users] At what point is the random seed generated?

2014-01-27 Thread Trayder Thomas
Hi,
When using 'gen-seed = -1' at what point is the random seed assigned?

e.g. Does it use the process ID of grompp and embed the seed number in the
tpr file, or does it use the process ID of mdrun?

I ask because I have 50 identical simulations started from the same tpr
file :(

Thanks,
-Trayder
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] At what point is the random seed generated?

2014-01-27 Thread David van der Spoel

On 2014-01-28 08:37, Trayder Thomas wrote:

Hi,
When using 'gen-seed = -1' at what point is the random seed assigned?

e.g. Does it use the process ID of grompp and embed the seed number in the
tpr file, or does it use the process ID of mdrun?

I ask because I have 50 identical simulations started from the same tpr
file :(

Thanks,
-Trayder

I guess you found out. Sorry about that. It is done in grompp and same 
tpr should give reproducible results. So you want to generate 50 
different tpr files.


--
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
--
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] At what point is the random seed generated?

2014-01-28 Thread Mark Abraham
Indeed. grompp does report the seed it uses to stderr.

Mark


On Tue, Jan 28, 2014 at 8:51 AM, David van der Spoel
wrote:

> On 2014-01-28 08:37, Trayder Thomas wrote:
>
>> Hi,
>> When using 'gen-seed = -1' at what point is the random seed assigned?
>>
>> e.g. Does it use the process ID of grompp and embed the seed number in the
>> tpr file, or does it use the process ID of mdrun?
>>
>> I ask because I have 50 identical simulations started from the same tpr
>> file :(
>>
>> Thanks,
>> -Trayder
>>
>>  I guess you found out. Sorry about that. It is done in grompp and same
> tpr should give reproducible results. So you want to generate 50 different
> tpr files.
>
> --
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
> sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at http://www.gromacs.org/
> Support/Mailing_Lists/GMX-Users_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-users or
> send a mail to gmx-users-requ...@gromacs.org.
>
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] At what point is the random seed generated?

2014-01-28 Thread Trayder Thomas
Curses! Kinda seemed intuitive that way. I assume the philosophy being
worked towards is that every unique run should have a unique .tpr file that
it is reproducible from?

Curiously, I ran and checked a first batch on a different cluster and the
simulations rapidly diverged (even between simulations run one after the
other on the same node), while the second cluster managed to create 50
identical simulations across 50 different nodes. The most obvious
difference being that the diverging simulations used GPUs.

I suspect I never would have noticed if I had of stuck to the one cluster.
Might be worth stating explicitly in the manual for gen-seed, with
reproducibility being what it is.

Oh well, Thanks guys.

-Trayder




On Tue, Jan 28, 2014 at 10:55 PM, Mark Abraham wrote:

> Indeed. grompp does report the seed it uses to stderr.
>
> Mark
>
>
> On Tue, Jan 28, 2014 at 8:51 AM, David van der Spoel
> wrote:
>
> > On 2014-01-28 08:37, Trayder Thomas wrote:
> >
> >> Hi,
> >> When using 'gen-seed = -1' at what point is the random seed assigned?
> >>
> >> e.g. Does it use the process ID of grompp and embed the seed number in
> the
> >> tpr file, or does it use the process ID of mdrun?
> >>
> >> I ask because I have 50 identical simulations started from the same tpr
> >> file :(
> >>
> >> Thanks,
> >> -Trayder
> >>
> >>  I guess you found out. Sorry about that. It is done in grompp and same
> > tpr should give reproducible results. So you want to generate 50
> different
> > tpr files.
> >
> > --
> > David van der Spoel, Ph.D., Professor of Biology
> > Dept. of Cell & Molec. Biol., Uppsala University.
> > Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
> > sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
> >
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at http://www.gromacs.org/
> > Support/Mailing_Lists/GMX-Users_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-users or
> > send a mail to gmx-users-requ...@gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or
> send a mail to gmx-users-requ...@gromacs.org.
>
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] At what point is the random seed generated?

2014-01-29 Thread Mark Abraham
On Jan 29, 2014 4:59 AM, "Trayder Thomas"  wrote:
>
> Curses! Kinda seemed intuitive that way. I assume the philosophy being
> worked towards is that every unique run should have a unique .tpr file
that
> it is reproducible from?

It has that effect, which is very useful for debugging. I think of the
design more like that the tpr should describe the physics, and command line
options to mdrun should relate to its implementation (though this divide is
not perfectly implemented, either). Setting up the initial velocities is
considered part of setting up the model physics. Whether you want to
simulate copies of the same or different systems is your business.

> Curiously, I ran and checked a first batch on a different cluster and the
> simulations rapidly diverged (even between simulations run one after the
> other on the same node), while the second cluster managed to create 50
> identical simulations across 50 different nodes. The most obvious
> difference being that the diverging simulations used GPUs.

This kind of thing is expected - see
http://www.gromacs.org/Documentation/Terminology/Reproducibility

> I suspect I never would have noticed if I had of stuck to the one cluster.
> Might be worth stating explicitly in the manual for gen-seed, with
> reproducibility being what it is.

True, but http://manual.gromacs.org/online/mdp_opt.html#vel specifies "in
grompp" for gen-vel. We can't repeat ourselves everywhere, unfortunately,
lest one copy falls out of date! :-(

Mark

> Oh well, Thanks guys.
>
> -Trayder
>
>
>
>
> On Tue, Jan 28, 2014 at 10:55 PM, Mark Abraham wrote:
>
> > Indeed. grompp does report the seed it uses to stderr.
> >
> > Mark
> >
> >
> > On Tue, Jan 28, 2014 at 8:51 AM, David van der Spoel
> > wrote:
> >
> > > On 2014-01-28 08:37, Trayder Thomas wrote:
> > >
> > >> Hi,
> > >> When using 'gen-seed = -1' at what point is the random seed assigned?
> > >>
> > >> e.g. Does it use the process ID of grompp and embed the seed number
in
> > the
> > >> tpr file, or does it use the process ID of mdrun?
> > >>
> > >> I ask because I have 50 identical simulations started from the same
tpr
> > >> file :(
> > >>
> > >> Thanks,
> > >> -Trayder
> > >>
> > >>  I guess you found out. Sorry about that. It is done in grompp and
same
> > > tpr should give reproducible results. So you want to generate 50
> > different
> > > tpr files.
> > >
> > > --
> > > David van der Spoel, Ph.D., Professor of Biology
> > > Dept. of Cell & Molec. Biol., Uppsala University.
> > > Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
> > > sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
> > >
> > > --
> > > Gromacs Users mailing list
> > >
> > > * Please search the archive at http://www.gromacs.org/
> > > Support/Mailing_Lists/GMX-Users_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-users or
> > > send a mail to gmx-users-requ...@gromacs.org.
> > >
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or
> > send a mail to gmx-users-requ...@gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or
send a mail to gmx-users-requ...@gromacs.org.
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] At what point is the random seed generated?

2014-01-29 Thread Szilárd Páll
On Wed, Jan 29, 2014 at 4:46 AM, Trayder Thomas
 wrote:
> Curses! Kinda seemed intuitive that way. I assume the philosophy being
> worked towards is that every unique run should have a unique .tpr file that
> it is reproducible from?
>
> Curiously, I ran and checked a first batch on a different cluster and the
> simulations rapidly diverged (even between simulations run one after the
> other on the same node), while the second cluster managed to create 50
> identical simulations across 50 different nodes. The most obvious
> difference being that the diverging simulations used GPUs.

GPU runs will naturally diverge as we use atomic operations for the
final step in force reduction/accumulation, hence the implementation
is inherently non-deterministic. Your runs on the "second cluster"
must have used no-domain decomposition, though, otherwise those runs
would also be non-deterministic.

>
> I suspect I never would have noticed if I had of stuck to the one cluster.
> Might be worth stating explicitly in the manual for gen-seed, with
> reproducibility being what it is.
>
> Oh well, Thanks guys.
>
> -Trayder
>
>
>
>
> On Tue, Jan 28, 2014 at 10:55 PM, Mark Abraham 
> wrote:
>
>> Indeed. grompp does report the seed it uses to stderr.
>>
>> Mark
>>
>>
>> On Tue, Jan 28, 2014 at 8:51 AM, David van der Spoel
>> wrote:
>>
>> > On 2014-01-28 08:37, Trayder Thomas wrote:
>> >
>> >> Hi,
>> >> When using 'gen-seed = -1' at what point is the random seed assigned?
>> >>
>> >> e.g. Does it use the process ID of grompp and embed the seed number in
>> the
>> >> tpr file, or does it use the process ID of mdrun?
>> >>
>> >> I ask because I have 50 identical simulations started from the same tpr
>> >> file :(
>> >>
>> >> Thanks,
>> >> -Trayder
>> >>
>> >>  I guess you found out. Sorry about that. It is done in grompp and same
>> > tpr should give reproducible results. So you want to generate 50
>> different
>> > tpr files.
>> >
>> > --
>> > David van der Spoel, Ph.D., Professor of Biology
>> > Dept. of Cell & Molec. Biol., Uppsala University.
>> > Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
>> > sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
>> >
>> > --
>> > Gromacs Users mailing list
>> >
>> > * Please search the archive at http://www.gromacs.org/
>> > Support/Mailing_Lists/GMX-Users_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-users or
>> > send a mail to gmx-users-requ...@gromacs.org.
>> >
>> --
>> Gromacs Users mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or
>> send a mail to gmx-users-requ...@gromacs.org.
>>
> --
> Gromacs Users mailing list
>
> * Please search the archive at 
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
> mail to gmx-users-requ...@gromacs.org.
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.