[lammps-users] Failed to allocate -1042235184 bytes for array neigh:binhead

Hi ,

i am simulating a problem with fix nve and a thermostat.everything works fine. But when i am trying to put in addition a barostat after some simulation steps i receive this error:
Failed to allocate -1042235184 bytes for array neigh:binhead
I tried to run it serial and nothing changes. Is this caused by the barostat ?

I'm guesing your box size has become huge (due to the barostat),
and thus when LAMMPS attempts to chop it into bins, there
are too many bins.

So the error is a symptom, but the real problem is why your
box size exploded.


i have used a number density and a volume so it won't be exlode. How can i check was is going wrong?

Have you printed out the volume and other
thermo info near the time when things go bad?


yes .there are no differences.just the usual "small" fluctuations

Failed to allocate -1042235184 bytes for array neigh:binhead

The array binhead is 4 bytes (integer) * number of bins on a proc.
The # of bins is Nbinx * Nbiny * Nbinz. Nbinx is the box length
in x divided by neighbor binsize * 2. Neighbor binsize is force cutoff + skin.

The only way that will be a negative number (in the error message)
is if the size of the array exceeds 2 billion. You can do the
math yourself. It will only happen if the box size is unrealistically

I suggest you put some debug statements in the code near where
the error is generated and find out what is different about
what is actually happening versus what you think is happening.