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
merged 3 commits into from Oct 19, 2018

Conversation

Projects
None yet
2 participants
@sjplimp
Copy link
Contributor

sjplimp commented Oct 18, 2018

Purpose

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.

Author(s)

Steve

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)

@sjplimp

This comment has been minimized.

Copy link
Contributor

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

@akohlmey

This comment has been minimized.

Copy link
Member

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

@sjplimp

This comment has been minimized.

Copy link
Contributor

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
Details
lammps/pull-requests/kokkos_omp head run ended
Details
lammps/pull-requests/openmpi-pr head run ended
Details
lammps/pull-requests/serial-pr head run ended
Details
lammps/pull-requests/shlib-pr head run ended
Details

@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