lammps run every, error

Dear Lammps Users,

I encounter a strange problem while running lammps using “run every” command.

I am simulating Helium bombardment on tungsten lattice in lammps.

I want to stop the simulations when the simulation box size is greater than
certain value. So i use the command,

run 20000 every 500 “variable zhival equal zhi” "if ‘${zhival} >= 120’ then quit "

Now, in this case, when my simulation step reaches 16000, the simulation stops because it satisfies the if condition

The output is :
Step Temp PotEng KinEng Press Pxx Pyy Pzz Volume Xlo Xhi Ylo Yhi Zlo Zhi

16000 2987.5038 -262687.96 12309.015 1186.4179 1463.2165 840.45356 1255.5837 806189.57 -0.5431528 79.468153 -0.52815146 79.453151 -0.163516 125.81525

Here zhival = 125.81525

Now I compared the results without “run every” command , i.e., with run 20000

The thermodynamic outputs are calculated at every 100 time steps in both the cases.

In this case, the out put is quite different. For 16000th time step with out “every” statement, the output looks like

Step Temp PotEng KinEng Press Pxx Pyy Pzz Volume Xlo Xhi Ylo Yhi Zlo Zhi
16000 3007.7591 -262771.24 12392.47 2002.6357 1236.1097 1782.5314 2989.2659 535033.09 -0.5431528 79.468153 -0.52815146 79.453151 -0.163516 83.443132

Here zhival = 83.443132

What is the reason for this discrepancy?

I use the latest lammps version (lammps-14May13)

Thanking you
Sincerely
Maya

I have no idea. Were the 2 simulations identical
for a long time and slowly diverge? If so, then
note this from the run command doc page:

If the {pre} and {post} options are set to “no” when used with the
{every} keyword, then the 1st run will do the full setup and the last
run will print the full timing summary, but these operations will be
skipped for intermediate runs.

If you do not do this, then LAMMPS re-initializes
between the short runs. Which means new neighbor
lists, etc. Which can lead to 2 trajectories diverging
slowly.

Steve