Energy becomes inf after read_dump

Input file:

units real
atom_style atomic

boundary p p p

read_data reference.lmp nocoeff
read_dump dump.xyz 0 x y z box no format xyz

mass * 1.0

pair_style lj/cut 5.0
pair_coeff * * 1 1

neighbor 1 bin
neigh_modify every 1 delay 0 check yes

run 0

reference.lmp:

#

2 atoms
1 atom types

0.0 20 xlo xhi
0.0 20 ylo yhi
0.0 20 zlo zhi

Atoms  # atomic

1 1 1.0 2.0 3.0
2 1 1.5 2.5 3.5

dump.xyz:

2

1 1.0 2.0 3.0
1 1.5 2.5 3.5

thermo output:

   Step          Temp          E_pair         E_mol          TotEng         Press     
         0   0              inf            0              inf           -nan  

If the read_dump line is removed then the output is fine.

Environment (configured with cmake ../cmake, 11 Feb 2026):

OS: Linux "Ubuntu 25.10" 6.17.0-8-generic x86_64

Compiler: GNU C++ 15.2.0 with OpenMP 4.5
C++ standard: C++17
Embedded fmt library version: 10.2.0
Embedded JSON class version: 3.12.0

MPI v3.1: Open MPI v5.0.8, package: Debian OpenMPI, ident: 5.0.8, repo rev: v5.0.8, May 30, 2025

1 Like

Hi @initialize,

I can’t reproduce your issue here. LAMMPS version?

11 Feb 2026

I can reproduce the issue with the latest pulled branch and the following compiling options:

OS: Linux "Ubuntu 22.04.5 LTS" 6.8.0-101-generic x86_64                                                                                 
                                                                                                                                        
Compiler: GNU C++ 11.4.0 with OpenMP 4.5                                                                                                
C++ standard: C++17                                                                                                                     
Embedded fmt library version: 10.2.0                                                                                                    
Embedded JSON class version: 3.12.0                                                                                                     
                                                                                                                                        
MPI v3.1: Open MPI v5.0.10, package: Open MPI germain@N302P-A04316 Distribution, ident: 5.0.10, repo rev: v5.0.10, Feb 23, 2026  

Note that using 2 MPI threads seems to correct it, but not other values from 1 to 8. Weird. Will investigate.

Bugfix should be this: Collected small fixes by akohlmey · Pull Request #4910 · lammps/lammps · GitHub

2 Likes

Can confirm, I traced down the same odd pattern. This solved the issue.

1 Like