"Dangerous build = 2 or 0" error

Hi everyone,

One of the systems I am simulating on a film substrate is running extremely slowly and generating a “Dangerous build = 2 or 0” error at regular intervals. What could be causing this issue? I have ensured that the substrate is properly fixed, and the interactions between the liquid particles and the substrate surface are governed by the Lennard-Jones (LJ) potential, having appropriate bond length and strength.
neigh_modify check yes delay 1 every 1
comm_modify cutoff 3.5

---------------------------------log.lammps-------------------------------------------------------------------
Step Temp PotEng KinEng TotEng Press
739 0 -5.5777717 0 -5.5777717 -0.47707963
10000 0.015246652 -5.5736568 0.022867777 -5.5507891 -0.45239907
20000 0.17610997 -5.3445234 0.26413954 -5.0803838 -0.24477764
20739 0.20900042 -5.294638 0.31347046 -4.9811676 -0.24784399
Loop time of 2211.06 on 64 procs for 20000 steps with 10392 atoms

Performance: 781.526 tau/day, 9.045 timesteps/s
74.4% CPU use with 64 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total

Pair | 0.0013911 | 1.1095 | 2.8215 | 89.8 | 0.05
Bond | 0.0014921 | 0.13165 | 0.31893 | 29.4 | 0.01
Neigh | 8.7672 | 11.287 | 13.314 | 42.8 | 0.51
Comm | 194.65 | 722.13 | 1136.3 |1291.0 | 32.66
Output | 0.30101 | 0.32505 | 0.35001 | 2.4 | 0.01
Modify | 534.53 | 961.79 | 1500.5 |1125.0 | 43.50
Other | | 514.3 | | | 23.26

Nlocal: 162.375 ave 319 max 0 min
Histogram: 16 3 4 1 4 6 6 3 8 13
Nghost: 1101.77 ave 2298 max 26 min
Histogram: 16 0 0 5 7 10 14 4 4 4
Neighs: 5879.09 ave 12610 max 0 min
Histogram: 16 5 3 5 4 7 2 2 7 13

Total # of neighbors = 376262
Ave neighs/atom = 36.20689
Ave special neighs/atom = 4.6974596
Neighbor list builds = 171
Dangerous builds = 0

Thanks
TP

Your system is rather small (10392 atoms) for 64 processors. The MPI timing breakdown also confirms that most of the time is wasted on communication and fixes. I wonder if neigh_modify and comm_modify are also reported in the “Modify” section of the MPI breakdown.

I would do a quick scaling test with a different number of processors, starting from a low count.

Thanks for that idea. Changing the delay to 0 really helped. Initially I used
neigh_modify check yes delay 1 every 1
comm_modify cutoff 3.5

However, I took your suggestion to check the performance-scaling; it looks like 64 does better for the same code.
------------------------------ 32 processors--------------------------------------------
Performance: 210419.100 tau/day, 2435.406 timesteps/s
99.8% CPU use with 32 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total

Pair | 0.00079369 | 2.0484 | 4.9498 | 124.2 | 24.94
Bond | 0.00086855 | 0.2422 | 0.59989 | 40.9 | 2.95
Neigh | 0.1489 | 0.15402 | 0.15844 | 0.7 | 1.88
Comm | 0.75293 | 3.5033 | 6.7836 | 108.2 | 42.66
Output | 5.3301e-05 | 5.5652e-05 | 7.9291e-05 | 0.0 | 0.00
Modify | 0.25082 | 2.1181 | 7.1041 | 195.1 | 25.79
Other | | 0.1461 | | | 1.78

Nlocal: 324.75 ave 620 max 0 min
Histogram: 8 1 2 1 2 2 3 1 3 9
Nghost: 1499.19 ave 3110 max 50 min
Histogram: 8 0 0 2 4 6 6 2 2 2
Neighs: 11771.9 ave 24865 max 0 min
Histogram: 8 2 2 2 3 2 1 2 3 7

Total # of neighbors = 376700
Ave neighs/atom = 36.249038
Ave special neighs/atom = 4.6974596
Neighbor list builds = 151
Dangerous builds = 0

------------------------------ 64 processors--------------------------------------------

Performance: 404940.940 tau/day, 4686.816 timesteps/s
99.8% CPU use with 64 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total

Pair | 0.00080607 | 0.8326 | 2.1492 | 77.2 | 19.51
Bond | 0.00087938 | 0.12484 | 0.31191 | 29.2 | 2.93
Neigh | 0.091785 | 0.095748 | 0.099677 | 0.7 | 2.24
Comm | 0.317 | 1.9119 | 3.2416 | 68.3 | 44.80
Output | 6.989e-05 | 7.2443e-05 | 0.00010531 | 0.0 | 0.00
Modify | 0.18136 | 1.1657 | 3.6994 | 125.0 | 27.32
Other | | 0.1364 | | | 3.20

Nlocal: 162.375 ave 319 max 0 min
Histogram: 16 3 4 1 4 6 6 3 8 13
Nghost: 1101.77 ave 2298 max 26 min
Histogram: 16 0 0 5 7 10 14 4 4 4
Neighs: 5879.09 ave 12610 max 0 min
Histogram: 16 5 3 5 4 7 2 2 7 13

Total # of neighbors = 376262
Ave neighs/atom = 36.20689
Ave special neighs/atom = 4.6974596
Neighbor list builds = 171
Dangerous builds = 0