[gmx-users] why does trjcat take so much memory?

chris.neale at utoronto.ca chris.neale at utoronto.ca
Wed Oct 13 16:16:52 CEST 2010

Thank you David, Berk, and Roland.

unix cat is a good option (I didn't realize that this was possible)  
and so is scripting to do it in a number of steps.

I have filed enhancement request #593.

Thank you,

--- original message ---

On 2010-10-13 01.54, chris.neale at utoronto.ca wrote:
> I have 28,000 .xtc files, each having a single frame and each 150K. If I
> run du -hs on the directory containing these .xtcs, I get 4.4 GB.
> Nevertheless, when I run trjcat -f *.xtc -o ../tot.xtc , my memory
> consumption goes over 11 GB and then I run out of available memory.
The program reads the first frame of all files, and since we roughly
have three times compression from xtc to float your figures of 4 vs. 11
Gb. match perfect.

Although this is an extreme case, where there is a clear workaround
(more memory) it could be worthwhile looking into an enhancement that
releases the memory again after checking the first frame of all files.
It is anyway impossible to keep 28,000 files open. Please file a
bugzilla as an enhancement.

Another workaround is to do this in 10 steps or so. Some scripting
required but not too bad.

> Sure, I could find a larger memory system, but why does it take >=3x
> more memory than the individual files took in disk space? Does anybody
> know any commands
> This is gromacs 4.0.5 and 4.0.7 and 4.5-beta2.
> Thank you,
> Chris.

More information about the gromacs.org_gmx-users mailing list