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

David van der Spoel spoel at xray.bmc.uu.se
Wed Oct 13 08:41:17 CEST 2010


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.
>


-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se



More information about the gromacs.org_gmx-users mailing list