[lammps-users] Parallel and serial simulations

I try to begin two different simulations from the same restart file. One for a serial run and a second for a parallel run. Despite the fact that i use the same restart file the two simulations give different results. Why does it happen?

I try to begin two different simulations from the same restart file.
One for a serial run and a second for a parallel run. Despite the fact
that i use the same restart file the two simulations give different
results. Why does it happen?

this happens because you use floating point numbers and those
have finite accuracy and - most importantly - their math is not
associative, i.e. a + (b + c) != (a + b) + c.
in parallel runs this is exactly what happens.

furthermore, coupled partial differential equations
like you solve in MD are not Lyapunov stable, i.e.
if you have small deviations between two trajectories,
then they will diverge exponentially (this is sometimes
also called "butterfly effect"). both trajectories still
sample the same phase space, provided your system is
in equilibrium. so there is nothing wrong with this.

cheers,
   axel.

To add a practical note to Axel's correct answer, if your
2 runs on different numbers of procs start out identical
and slowly drift apart, then that is natural and nothing
to worry about. There are some commands in LAMMPS,
like fix langevin, which use different random # schemes
on different #'s of processors, and will thus diverge
quickly. Again, nothing to worry about.

Steve