Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart updates for fixes atom/swap, deposit, and gcmc #1484

merged 3 commits into from May 31, 2019


None yet
2 participants
Copy link

commented May 31, 2019


This PR has some updates and improvements when restarting fixes atom/swap, deposit, and gcmc

Related Issues

This adds a check to avoid unexpected behavior as reported on lammps-users


Axel Kohlmeyer (Temple U)


By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

Restart files for the fixes atom/swap, deposit, and gcmc will not be backward compatible due to storing additional information.

Implementation Notes

This uses the ubuf() union to correctly store 64-bit timestep numbers in double buffers of the restart file. It also stores the number of MC attempts and successes as reported by the corresponding compute_vector() method of the fix into the restart file (so they won't start from zero again).
It also stores the timestep when the restart was written, so that upon reading back the state, it can be checked whether the timestep was changed via reset_timestep. This is creating a problem, since the restart stores at what timestep the MC step(s) of the fix should be attempted next. if it is changed via reset_timestep, the restarted fix may remain inactive for a very long time.

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system

akohlmey added some commits May 31, 2019

properly store 64-bit integers for next_reneighbor into double type b…
…uffers for restarts of fixes

also store number of attemps and number of successes in restart and retrieve those from it

@akohlmey akohlmey requested review from athomps, sjplimp and stanmoore1 May 31, 2019

@akohlmey akohlmey marked this pull request as ready for review May 31, 2019

Copy link

left a comment

good upgrades, need to flag in the release notes
this (presumably) breaks backward compatibility
with old restart files


This comment has been minimized.

Copy link
Member Author

commented May 31, 2019

@akohlmey akohlmey merged commit 3e4fd3d into lammps:master May 31, 2019

6 checks passed

lammps/pull-requests/build-docs-pr head run ended
lammps/pull-requests/cmake/cmake-serial-pr head run ended
lammps/pull-requests/kokkos-omp-pr head run ended
lammps/pull-requests/openmpi-pr head run ended
lammps/pull-requests/serial-pr head run ended
lammps/pull-requests/shlib-pr head run ended

@akohlmey akohlmey deleted the akohlmey:reneighbor-64-bit-restart-fix branch May 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.