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

Fix issue #514: Output correct block averages first time after restart #517

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

LSchwiebert
Copy link
Collaborator

The code for computing the number of steps from the checkpoint to the first output of block averages was wrong when we were restarting.

The correct values were being computed by the system, but we output the wrong block averages because the code calculated the number of steps incorrectly, so had the wrong denominator.

The patch has been tested against the example provided in issue #514 and is now producing the expected output.

@GregorySchwing
Copy link
Collaborator

GregorySchwing commented Sep 12, 2023

I tested this input and got ballpark same results (<1% diff in Blk energy). It's checkpointing, so it should be identical. Let's merge this and then follow up with a separate issue for why the checkpointing isn't exactly the same.

@LSchwiebert LSchwiebert requested review from GregorySchwing and removed request for go2213 September 12, 2023 21:07
@LSchwiebert
Copy link
Collaborator Author

I noticed that the results were not identical too, but assumed it was because PRNG RANDOM is specified in the config file. And I don't see that the pdb file has any random seed. So, that may be the issue. So, we should decide, but if we want a random run to be consistent with the same initial random seed, we need another patch.

I also agree it should be a separate issue.

@jpotoff
Copy link
Collaborator

jpotoff commented Sep 12, 2023

Are we loading the checkpoint file here? If we're loading checkpoint, the results should be identical. If not, then we will follow a slightly different trajectory.

@LSchwiebert
Copy link
Collaborator Author

Good point. The results should be identical if we are loading the binary file, as the atom positions should be identical. But even if we aren't, we should be getting the same result from multiple runs using the checkpoint file. They may not match the original, but they should match each other.

I really think this has to do with how the random numbers are being generated. Do we output the current random value(s) so that we can restart from that point, or skip this when we are starting with a Random seed?

@jpotoff jpotoff merged commit 8f427ea into development Sep 13, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants