Project

General

Profile

Feature #2932

Failed to realloc error

Added by Maxim Brodmerkel 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
mdrun
Target version:
Difficulty:
hard
Close

Description

Hello,

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:

Fatal error:
Not enough memory. Failed to realloc 18446744065119617024 bytes for
nlist->jjnr, nlist->jjnr=0x2b5cb01c9010

Or, after using 2016.6:

Fatal error:
Not enough memory. Failed to realloc -8589934592 bytes for nlist->jjnr,
nlist->jjnr=3eb9a010

Further informations:
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,
Maxim Brodmerkel

em.log (14.9 KB) em.log Energy minimisation .log-file Maxim Brodmerkel, 04/25/2019 10:11 AM
em.tpr (34.8 MB) em.tpr Energy minimisation .tpr-file Maxim Brodmerkel, 04/25/2019 10:11 AM
stnv.pdb (11.4 MB) stnv.pdb Maxim Brodmerkel, 04/25/2019 10:37 AM

Associated revisions

Revision 5c4b41ed (diff)
Added by Paul Bauer 4 months ago

Add check for allocating too many interactions

Also change argument to nbnxn reallocation function from int to
std::size_t to avoid signed integer overflow.

Fixes #2932

Change-Id: I97bdd825ba1e4d81b65b4e4c037f980164c571f2

History

#1 Updated by Berk Hess 5 months ago

  • Status changed from New to Accepted
  • Assignee deleted (Mark Abraham)
  • 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.

#2 Updated by Paul Bauer 4 months ago

  • Status changed from Accepted to Fix uploaded
  • Target version set to 2019.3

#3 Updated by Paul Bauer 4 months ago

  • Status changed from Fix uploaded to Resolved

#4 Updated by Paul Bauer 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF