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

added -restart2dump command-line option #1162

merged 3 commits into from Oct 19, 2018


None yet
2 participants
Copy link

sjplimp commented Oct 18, 2018


Added a -restart2dump command-line option, to convert a restart file to a (parallel) dump file.
Similar to -restart for converting to a data file.



Backward Compatibility

Change the old -r or -restart option to -restart2data. New one is -restart2dump. Shortcuts
are now -r2data and -r2dump.

Implementation Notes

Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected

Post Submission Checklist

Please check the fields below as they are completed

  • The feature or features in this pull request is complete
  • Suitable new documentation files and/or updates to the existing docs are included
  • One or more example input decks are included
  • The source code follows the LAMMPS formatting guidelines

Further Information, Files, and Links

Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)


This comment has been minimized.

Copy link

sjplimp commented Oct 18, 2018

@akohlmey In the code at the bottom of the constructor in lammps.cpp is snprint() calls
that now take the length arg for safety. However the logic there also appends
args via strcat() and sprintf() which look to be not safe. (same logic as before my changes)

@akohlmey akohlmey self-requested a review Oct 19, 2018

@akohlmey akohlmey added this to the Stable Release Fall 2018 milestone Oct 19, 2018


This comment has been minimized.

Copy link

akohlmey commented Oct 19, 2018

@sjplimp i have reviewed and update the buffer handling to be safe. i've also updated the embedded short command line help string. this works for me. please check it out and reassign to me when it is ok with you.

@akohlmey akohlmey assigned sjplimp and unassigned akohlmey Oct 19, 2018


This comment has been minimized.

Copy link

sjplimp commented Oct 19, 2018

@akohlmey all looks good

@sjplimp sjplimp assigned akohlmey and unassigned sjplimp Oct 19, 2018

@akohlmey akohlmey merged commit 15de096 into master Oct 19, 2018

5 checks passed

lammps/pull-requests/build-docs-pr head run ended
lammps/pull-requests/kokkos_omp 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 restart2dump branch Oct 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment