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

Provide a method getCurrentStep() for all platform? #2655

Closed
z-gong opened this issue Apr 24, 2020 · 2 comments · Fixed by #3248
Closed

Provide a method getCurrentStep() for all platform? #2655

z-gong opened this issue Apr 24, 2020 · 2 comments · Fixed by #3248
Milestone

Comments

@z-gong
Copy link
Contributor

z-gong commented Apr 24, 2020

When restarting from a checkpoint, it's useful to know which step it is at so that trajectories can be appended at the correct step, which is necessary for analyzing time correlation properties.

Cuda and OpenCL platform record the current step in the checkpoint file. The CudaContext and OpenCLContext have a getStepCount() method, but it's not exposed in python wrapper. For Reference and CPU platform, there's no such method, and the step is not saved in the checkpoint.

Do you think it's reasonable to provide such a method for all platforms, and also save step information in the checkpoint for Reference platform?

@z-gong
Copy link
Contributor Author

z-gong commented Apr 25, 2020

Just realized that there's a method State.getTime(). So getCurrentStep doesn't seem necessary.
But It would be useful to save step and time information in checkpoint for Reference and CPU platform.

@peastman
Copy link
Member

Simulation also has a currentStep field you can access.

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

Successfully merging a pull request may close this issue.

2 participants