GROMACS version: any
GROMACS modification: Yes/No
Here post your question
Hi, I wonder whether we have an option in GROMACS that control the accumulated data (somewhat likes N times of the frequency writing to log file, trajectory file in MDP file, the data will be flushed into files on disk) on GPU memory and flush the data to files after certain period of steps.
Thank you very much in advance for helping me.
I’m not sure that I understand what you mean. Do you want to dump data in GPU memory to other than the standard output files (.edr, .xtc, .trr, .xvg)? Would you like just a dump of the whole GPU memory? Is there a specific reason why you would like that?
Hi @MagnusL
Thank you very much for your reply.
My question is about the output files writing period setting.
Usually, we can set the option for dumping the data such as coordinates, energy, log etc to files by just changing the options in mdp files. For example, every 50000 steps GROMACS will write to file
What I would like to do is instead of the fact every 50000 steps, GROMACS write to files, GROMACS will keep those data in memory (GPU, CPU) and flush and write all those data to file at 5000000 steps.
Will it be possible to do that.
I see. There is no way to control that explicitly (by number of steps) in GROMACS. However, file output is usually buffered by the file system and/or when using MPI (I’m not sure about the exact details). It is possible that the GMX_LOG_BUFFER environment variable will help you, see Environment Variables - GROMACS 2024.4 documentation, but I guess there would be a maximum size.
Keep in mind, all files are automatically flushed (written) when a checkpoint file is written, to ensure a consistent state to restart from. So, if you want to flush at very long intervals you will have to change the checkpoint interval (-cpt option to gmx mdrun) and you’ll have to ask yourself if that is worth the risk of having to re-run parts of the simulation due to long time between checkpoints.