<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi,<br><br>Gromacs, including the MPI version, is completely deterministic,<br>except for, if I recall correctly, two algorithms.<br>One is PME with fftw as the FFT library. FFTW does timings of different algorithms<br>and uses the fastest one, the results will depend on the exact load of the machine<br>during the timing phase.<br>The other is the dynamic load balancing.<br><br>mdrun -reprod will try to turn off all these non-deterministic algorithms,<br>at the cost of performance. This will give you reproducable simulations<br>(if you run exactly the same tpr file on exactly the same system with exactly<br>the same binary and the same command line).<br>In most cases one is not interested in exact reproducability,<br>but in certain cases, noticably debugging, reproducability can be important.<br><br>Berk<br><br>> Date: Wed, 17 Feb 2010 11:42:39 +0100<br>> From: erikm@xray.bmc.uu.se<br>> To: gmx-users@gromacs.org<br>> Subject: Re: [gmx-users] Same starting structure but different         trajectories<br>> <br>> The times when registers are pushed to the stack may happen at different <br>> points in the calculations in different runs, so the "bonus accuracy" <br>> may be lost at different times. As I mentioned, a hardware interrupt may <br>> (will) force such an event, and this may be due to some external <br>> trigger, such as a mouse click or a keystroke.<br>> <br>> Note that there are other sources of discrepancy than the one I <br>> mentioned (and I'm not sure if that's even a common thing to find in <br>> modern AMD or Intel cpus, it's just an example). If you run your <br>> simulation in parallel, then the order that the processeses finish <br>> certain tasks may affect the outcome of certain floating point <br>> additions. In general, for floats (A+B)+C != A+(B+C), so if you have <br>> three processes that coimpute e.g. the kinetic energy for parts of your <br>> system, and the values are summed up by the MPI library, then the order <br>> of the summation may depend on the order in which the processes finish.<br>> <br>> As for the numerical chaos. It is all about the long term sensitivity to <br>> small differences in the initial conditions. Errors at time t can be <br>> estimated by factor exp(lambda*t), where lambda is the Lyapunov <br>> exponent. If lambda is larger than one then your error will increase <br>> exponentially, however small the initial error,a nd the system is thus <br>> chaotic. For n-body problems, like the ones we have in MD, even the <br>> analytic solutions are often chaotic.<br>> <br>> In general, the hardware side of things is increadibly more complicated <br>> than what you may first think as a programmer.<br>> <br>> Hope that helps your understanding.<br>> <br>> /Erik<br>> <br>> Emanuel Peter skrev:<br>> > Dear Erik,<br>> ><br>> > I still have some trouble to understand. <br>> > Could you give me a more detailed answer why I get two different <br>> > trajectories on the same machine? It should have the same registers and <br>> > numerical chaos should be exactly the same in that case.<br>> ><br>> > Bests,<br>> ><br>> > Emanuel<br>> ><br>> > <br>> >>>> Erik Marklund 02/17/10 10:05 AM >>><br>> >>>> <br>> > Well, unfortunately it doesn't. Numerical differences are introduced <br>> > here and there for different resasons. On some machines the registers <br>> > have more bits than you'd normally fit into a float or double, and hence <br>> > give higher precision. If those registers are pushed to the stack, then <br>> > the trailing bits get lost. This can happen due to thread scheduling or <br>> > hardware interrupts. Such small differences between runs will over time <br>> > build up to arbitrarily large differences because of the (numerically) <br>> > chaotic nature of MD simulations. When a program is parallelized even <br>> > more sources of such differences arise, since it's e.g. not known <br>> > beforehand in which order certain floats/doubles are added together, <br>> > which in turn may have a small effect on the results.<br>> ><br>> > /Erik<br>> ><br>> > Emanuel Peter skrev:<br>> > <br>> >> Hi Tsjerk,<br>> >><br>> >> I ran my job on the same machine and made exactly the same inputstructure and <br>> >> inputfile. <br>> >> What does chaos mean in your opinion? A computer should do exactly the same <br>> >> every time you start with the same starting conditions on the same machine. <br>> >><br>> >> I have to couple my ligand seperately and not as part of my protein, so I can't <br>> >> couple just two groups named Protein and Non-Protein. <br>> >><br>> >> Bests,<br>> >><br>> >> Emanuel <br>> >> <br>> >> <br>> >> <br>> >>>>> Tsjerk Wassenaar 02/17/10 9:40 AM >>><br>> >>>>> <br>> >>>>> <br>> >> Hi Emanuel,<br>> >><br>> >> Anything small can cause trajectories to diverge, it's chaos. The<br>> >> machine on which is run can make the difference. This is also covered<br>> >> in the list archives.<br>> >><br>> >> <br>> >> <br>> >>> ;Temperature coupling<br>> >>> tcoupl = nose-hoover<br>> >>> tc-grps = protein NA+ CFP SOL<br>> >>> tau_t = 0.1 0.1 0.1 0.1<br>> >>> ref_t = 300 300 300 300<br>> >>> <br>> >>> <br>> >> This is bad practice. Where did you get that from? Not from any _good_<br>> >> tutorial, surely. Check<br>> >> http://www.gromacs.org/Documentation/Terminology/Thermostats to learn<br>> >> more.<br>> >><br>> >> Cheers,<br>> >><br>> >> Tsjerk<br>> >><br>> >><br>> >> <br>> >> <br>> ><br>> ><br>> > <br>> <br>> <br>> -- <br>> -----------------------------------------------<br>> Erik Marklund, PhD student<br>> Laboratory of Molecular Biophysics,<br>> Dept. of Cell and Molecular Biology, Uppsala University.<br>> Husargatan 3, Box 596, 75124 Uppsala, Sweden<br>> phone: +46 18 471 4537 fax: +46 18 511 755<br>> erikm@xray.bmc.uu.se http://xray.bmc.uu.se/molbiophys<br>> <br>> -- <br>> gmx-users mailing list gmx-users@gromacs.org<br>> http://lists.gromacs.org/mailman/listinfo/gmx-users<br>> Please search the archive at http://www.gromacs.org/search before posting!<br>> Please don't post (un)subscribe requests to the list. Use the <br>> www interface or send it to gmx-users-request@gromacs.org.<br>> Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>                                            <br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>