fix efield results depend on number of cores in parallel run

I got a question about fix efield. I am running NVT on a water box. With fix efield, I realized the results (temperature, energy, etc) depend on how many cores I use in a parallel run. If I comment out fix efield lines, the results are independent of core numbers. I am using lammps/16Feb2016. I tried 15May2015, observed the same behavior. For a very old version of lammps (18Feb2011), I do not have this problem. I do see difference in the fix_efield codes between the old and new versions. The other test I did was, with the latest version (16Feb2016), if I run the job at two places (one is a local cluster and the other is a XSEDE machine), I got the same results if I use the same number of cores (results with one core run locally are the same to the results with one core run at XSEDE). Any one observed similar behavior before? Is this a problem in my setup or something wrong with the code? Thanks.

Best,
Yong

Here is how I setup fix efield:

Stan can probably debug this or give advice.

Steve

Hi Stan and Steve, do we have any update on this? Please let me know if you need anything from my side. Thanks.

There is no guarantee that different numbers of cores will produce the same MD trajectories due to roundoff error. And different trajectories can lead to different statistical fluctuations in properties. Do you have a reason to believe that what you are seeing is more than statistical noise?

Hi Stan,

I understand your point. I thought about the statistical noise due to memory resolution or something like that, but does not seem to be the case here. To my understanding, statistical noise usually show up at long time, but I saw the difference after 50 steps (actually shorter than that). Then, I do not see such behavior with 18Feb2011 version (of course, there is no reason to believe that is correct). Third, for 16Feb2016, I got exactly the same results on two clusters. It is hard to believe the statistical noise are exactly the same on two clusters. And finally, all results are consistent if I turn off “fix efield”.

I do not know if or how this will affect my results, but just want to be confident with what I got.

Thanks,
Yong

Can you send an input script/files that reproduce the problem?

Thanks

Here you go …

in.mol_nvt_conf (2.31 KB)

restart.data (176 KB)

This was a bug–it is now fixed and should be released in the next patch. Here was the change:

Index: MISC/fix_efield.cpp

Thanks, by the way, for pointing this out. It only affects atom-style variables when used with fix efield. You should definitely re-run your simulations since this bug was producing erroneous results.