MPI and neighbor lists

Dear LAMMPS community,

using MPI version of Lammps I have noticed recently in log.lammps output file that I get Total # of neighbors = 0 and Ave neighs/atom = 0.
Concretely, for a case where I use a series of NVT and NpT runs in a single input file, a typical behavior for MPI run with np=8 would be:

Total # of neighbors = 0 (minimization)
Total # of neighbors = 0 (NVT with rescaling thermostat)
Total # of neighbors = 0 (NVT with Nose-Hoover)
Total # of neighbors = 1545836 (NpT with triclinic option)

Now, using the same inputs and a serial version I get:
Total # of neighbors = 1119694
Total # of neighbors = 1119428
Total # of neighbors = 1121035
Total # of neighbors = 1017800

For a test I have tried to compute g(r) in both cases and they show no difference. Also, using np=1 in MPI produces the same behavior as np=8. Also, dynamics runs smoothly without warnings or Dangerous builds.

Can anyone rationalise this behavior and suggest whether I should worry about it?

Thank you!

When reporting any kind of issue with LAMMPS, please always report which version of LAMMPS you are using and what platform you are running on.

Please provide a full log file or at least have a look at the corresponding output for “Neighbor list builds”.

Before trying to explain it, we need to be able to reproduce it. Can you provide a minimal input that reproduces this behavior, e.g. by modifying one of the inputs from the examples folder?

Hi again,

sorry for the late reply, I was trying to narrow down the problem as much as possible. I am running Lammps on Ubuntu 22.04 LTS using 17 Feb 2022 version of Lammps.
What I have come up with so far is that the adressed issue arises when I use hybrid pair styles. I tried to run inputs in examples/ file that use hybrid styles, but none of them shows the behavior I see with my inputs. To emphasize again, with serial version and using the same input I do not observe anything strange.
I have attached the minimal example along with three log files.

in.mix (1.1 KB)
log.1_proc (41.6 KB)
log.4_proc (41.6 KB)

First off, this is not really a simulation problem, but just an issue with diagnostic output.
So even if the output says, there are no neighbors, there are neighbor lists being compiled and used. You can see this from the neighbor list summary.

Neighbor list info ...
  update: every = 1 steps, delay = 0 steps, check = yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 3.3
  ghost atom cutoff = 3.3
  binsize = 1.65, bins = 5 5 5
  3 neighbor lists, perpetual/occasional/extra = 3 0 0
  (1) pair lj/cut, perpetual, skip from (3)
      attributes: half, newton on
      pair build: skip
      stencil: none
      bin: none
  (2) pair lj/cut/coul/long, perpetual, skip from (3)
      attributes: half, newton on
      pair build: skip
      stencil: none
      bin: none
  (3) neighbor class addition, perpetual
      attributes: half, newton on
      pair build: half/bin/atomonly/newton
      stencil: half/bin/3d
      bin: standard

Second, this summary also provides a hint why there are no neighbors reported. The neighbor list statistics will use the first non-skip neighbor list request. However, there is no such request due to using a hybrid pair style. The only neighbor list matching the requirement is an additional, internal neighbor list that is built by the neighbor list code so that the two skip lists for the two hybrid sub-styles can be compiled more efficiently.
BTW: this should be the same for either serial or parallel execution and that is what I see for your test input.

Third, for your system, there is no need to use a hybrid pair style, since lj/cut/coul/long can be used for all interactions.

Thank you a lot!
About the test case: yes, it is not actually the input I am using for my study, but I wanted to make up a simple example where I could use hybrid style to see whether the issue originates there.