Dump Command Behavior

Hi,

I need to write quite a few configuration files using the dump command for a simulation I’m running, and it occurred to me that for my purposes it could be more efficient to dump the output to a buffer in memory for later re-use than to actually write the data out to a file.

Is there any command or utility within LAMMPS that would make this possible, or is this the kind of modification that would require re-writing the dump command source file?

Thanks,
Tom Allen

Hi,

I need to write quite a few configuration files using the dump command for a
simulation I'm running, and it occurred to me that for my purposes it could
be more efficient to dump the output to a buffer in memory for later re-use
than to actually write the data out to a file.

Is there any command or utility within LAMMPS that would make this possible,
or is this the kind of modification that would require re-writing the dump
command source file?

if you run on current linux machine, most likely the /tmp/ file system
will be ramdisk, i.e. you would write to memory and not to a disk if
you create your files in /tmp/

on top of that, most operating systems will have file system caches
that are particularly optimized to caching short lived files
efficiently. so there is little loss of performance, when writing to a
spinning disk.

next, you have to consider that the most time consuming part of
writing (and particularly reading) formatted dump files, is the
process of converting internal data to formatted output and going
back. so, the might be more efficient when combined with binary dump
files or writing/reading restart files.

finally, you should check out the fix store/state command. that can be
use to archive and retrieve specific per atom properties in a real
memory-to-memory copy.

your original idea, on the other hand, makes very little sense to me,
as it would require far too complex modifications, specifically to
make it work in parallel.

axel.