Bug #2752

Memory usage when reading 2019-beta2 .tpr-files with trjconv from version 2018.3

Added by Christian Wennberg almost 2 years ago. Updated over 1 year ago.

analysis tools
Target version:
Affected version - extra info:
Affected version:


Trying to to use "gmx trjconv" in version 2018.3 and accidentally supplying a .tpr-file created with 2019-beta2 immediately consumed 15 gb of ram and swapped an additional 5 gb. Have only tried to recreate the issue with version 2018.3

Command used:

echo 0 | gmx trjconv -f traj_comp.xtc -o traj_whole.xtc -pbc whole

.tpr- and xtc-files for recreation are quite large and can be supplied upon request

topol.tpr (163 KB) topol.tpr Christian Wennberg, 11/19/2018 10:45 AM


#1 Updated by Paul Bauer almost 2 years ago

I think this should have caused an error instead of working. Can you upload a smaller example tpr file that I can check? Thanks!

#2 Updated by Christian Wennberg almost 2 years ago

Looks like the issue doesn't recreate itself anymore for some reason, now it throws this error message and quits every time I test it out.

Fatal error:
Not enough memory. Failed to calloc 1118727312 elements of size 4 for
(called from file
/home/wennberg/software/gromacs-2018.3/src/gromacs/fileio/tpxio.cpp, line

Example .tpr-file attached

#3 Updated by Paul Bauer almost 2 years ago

The error itself is caused because the tpr files in 2019 no longer support implicit solvent, leading to the sections in the file being offset and do_tpx reading garbage when passing through the do_cmap section that causes the memory exhaustion. Not sure how to fix this, as I don't think the formats from versions newer than the current one are supposed to be usable.

#4 Updated by Mark Abraham over 1 year ago

I'll see if I can reproduce this. If I can, then there's a bug we should fix.

#5 Updated by Mark Abraham over 1 year ago

  • Assignee set to Mark Abraham
  • Priority changed from Normal to Low

#6 Updated by Paul Bauer over 1 year ago

  • Target version changed from 2018.5 to 2019.1

retargeted to something other then 2018.5, likely will get fixed in a different branch.

#7 Updated by Mark Abraham over 1 year ago

  • Status changed from New to Feedback wanted
  • Target version changed from 2019.1 to 2019.2

I can't reproduce anything. My 2018.3 install (and tcbs module 2018.4, and my release-2018 HEAD) all reject this .tpr (tested with gmx dump -s topol.tpr), observing that the tpr format has version 116 which is higher than the program version 112. That's by design - we bump the version every time something is changed in an incompatible way.

release-2019 reads it as expected.

@Christian My only guess is that you may have had a gmx binary pick up a .so from another version, perhaps using a gmx from a build tree with another GMXRC already sourced.

#8 Updated by Christian Wennberg over 1 year ago

Yes this might very well be the case. I (for obvious reasons) didn't try to reproduce it more than 2 times, and when I test it now on another .tpr-file I get the expected behavior

#9 Updated by Mark Abraham over 1 year ago

  • Status changed from Feedback wanted to Rejected

Also available in: Atom PDF