[lammps-users] Updating restart files to work between different versions of LAMMPS

Hi to everybody!

Here’s a quick question, because after looking it up I didn’t find any hits matching this query online nor on the documentation. I use multiple different computers/home servers/supercomputers to run my LAMMPS simulations, however they don’t all have the exact same LAMMPS release version.

This becomes an issue because in some cases I use the write_restart and read_restart commands, which return errors when there’s a mismatch between the different versions, for example when creating a lattice on a personal computer to then launch the actual simulation on a supercomputer on an older version of LAMMPS.

Is there a way to convert restart files to work cross-versions, or is there another output type (like read data for example) that wouldn’t be affected by this limitation, or is my only propper option to reinstall LAMMPS on the same version everywhere?

Thank you very much for your time,
Have a nice day,

you have two options:

  1. use data files instead of restart files (less information is stored in a more portable (text) file) but then you need manually set a lot of data and you cannot cleanly restart fixes that store internal data in restart files

  2. use the same LAMMPS version throughout. For any production calculation, that is the only meaningful option in my personal opinion. Every software has bugs and changes to some of its internal code base. By using different versions interchangably, you just increase the likelihood of getting hit by some bug or that you overlook some situation where the semantics of some command were changed in a non-backward compatible manner (as it happens occasionally).


Alright thank you very much for confirming my thoughts, it’s very much appreciated!

Have a great day