Flush writes to the log file?

Is there any way I can force the OS write to the log file as soon as LAMMPS sends it the data?

If the log command had a flush keyword similar to that in the dump_modify command, it would be useful for the purposes of keeping track of the simulation through the thermo output in the log file. The screen output is not appropriate for this in many clusters because the output and error files are often only available after completion of the job.

https://docs.lammps.org/log.html
https://docs.lammps.org/dump_modify.html

You are looking in the wrong place. Try the thermo_modify command — LAMMPS documentation

Please note two things:

  • flushing buffers frequently, especially on parallel clusters with networked file systems, can incur a significant performance penalty
  • flushing buffers has no impact on any buffering done by the networked file system and how quickly any changes on the compute note will be synced with the file server and from there with the login node.
1 Like

Thank you! I should have known to look there.

I will be writing at sufficiently large intervals that it should not be an issue… say once every hour or so.

Yes, if there is latency in the file-network, there’s nothing I can do.