Failed to realloc error
I encountered an error while working on simulating the satellite tobacco necrosis virus, comprising 147960 atoms.
During the energy minimisation step using GROMACS version 2019.1 I encountered following error:
Not enough memory. Failed to realloc 18446744065119617024 bytes for
Or, after using 2016.6:
Not enough memory. Failed to realloc -8589934592 bytes for nlist->jjnr,
The simulations are done in the gas phase, with all-to-all neighbourlist and no cut-offs.
I hope you could help me with fixing this error.
With kind regards,
- Status changed from New to Accepted
- Assignee deleted (
- Priority changed from High to Normal
You are not using a cut-off, so you are requesting interactions between all atoms pairs: (147960^2)/2 = 10^10 interactions. That is more than the maximum value of an int, so you get these weird errors. We should add a check for this.
But even if this would work, is would be extremely slow. Use a cut-off, so you have a O(#atoms) instead of O(#atoms^2) computational problem.
It's probably not worth the effort to add a check for the group scheme, but we should add a check for the Verlet scheme, even if the issue occurs a (much) higher atoms counts there, because we use cluster pairs and we nearly always divide work over threads.