Coulomb energy value depending on the number of CPUs

Dear LAMMPS users,

While carrying out simulations on uranium dioxide (system containing both Coulomb and non-Coulomb interactions) using the 11Aug2017 version of LAMMPS, I found that, for the same atomic configuration, the code computes different values of the potential energy depending on the number of CPUs. I also found that, in fact, it was the Coulomb part of the potential energy which was impacted by the number of CPUs.

Below, you can find the results of Coulomb energy calculation on the same initial configuration of a 4x4x4 perfect UO2 supercell using different numbers of CPUs. The LAMMPS input file is also shown.

Result of the calculation run on 4 CPUs:

Ewald initialization …

WARNING: Using polynomial approximation for long-range coulomb (…/kspace.cpp:321)

G vector (1/distance) = 0.9

estimated absolute RMS force accuracy = 1.35346e-05

estimated relative force accuracy = 9.39924e-07

KSpace vectors: actual max1d max3d = 25441 23 51911

kxmax kymax kzmax = 23 23 23

.

.

.

Per MPI rank memory allocation (min/avg/max) = 44.8 | 44.8 | 44.8 Mbytes

Step PotEng TotEng

0 -9648.0006 -9648.0006

1 -9659.2292 -9659.2291

Loop time of 0.0401284 on 4 procs for 1 steps with 768 atoms

Result of the calculation run on 8 CPUs:

Ewald initialization …

WARNING: Using polynomial approximation for long-range coulomb (…/kspace.cpp:321)

G vector (1/distance) = 0.9

estimated absolute RMS force accuracy = 1.35346e-05

estimated relative force accuracy = 9.39924e-07

KSpace vectors: actual max1d max3d = 25441 23 51911

kxmax kymax kzmax = 23 23 23

.

.

.

Per MPI rank memory allocation (min/avg/max) = 44.74 | 44.74 | 44.74 Mbytes

Step PotEng TotEng

0 -9644.1998 -9644.1998

1 -9655.331 -9655.3309

Loop time of 0.0155909 on 8 procs for 1 steps with 768 atoms

Result of the calculation run on 16 CPUs:

Ewald initialization …

WARNING: Using polynomial approximation for long-range coulomb (…/kspace.cpp:321)

G vector (1/distance) = 0.9

estimated absolute RMS force accuracy = 1.35346e-05

estimated relative force accuracy = 9.39924e-07

KSpace vectors: actual max1d max3d = 25441 23 51911

kxmax kymax kzmax = 23 23 23

.

.

.

Per MPI rank memory allocation (min/avg/max) = 44.68 | 44.68 | 44.68 Mbytes

Step PotEng TotEng

0 -9636.9063 -9636.9063

1 -9647.8521 -9647.8519

Loop time of 0.00958024 on 16 procs for 1 steps with 768 atoms

The LAMMPS input file:

units metal

dimension 3

boundary p p p

atom_style atomic

atom_modify map array

read_data C_UO2.in

fix 1 all property/atom q

set type 1 charge 2.2208

set type 2 charge -1.1104

pair_style coul/long 9.991

pair_coeff * *

kspace_style ewald 1e-6

kspace_modify gewald 0.9

pair_modify table 0

timestep 0.0002

fix 2 all npt temp 20.0 20.0 0.02 iso 0.0 0.0 0.2

thermo 1

thermo_style custom step pe etotal

run 1

As can be seen in the output files, the Coulomb energy (PotEng of the first configuration, for example) depends on the number of CPUs, despite the fact that the calculations are carried out for the same set of atomic coordinates (so the Coulomb potential energy should be identical !).

What could be the cause of this discrepancy? If you have an answer, please let me know.

Thank you,

A.J.

Stan (CCd) can take a look at this.

Steve