You told me the initial box size which was reasonable, but what
is the box size on step 289 when the code halts? You are running
NPT so it will be different. I would print out vol lx ly lz every step
and see if it is fluctuating rapidly, and what it is on step 289.