Skip to content

Unexpected restart behaviour when restart files are copied #668

@trdurrant

Description

@trdurrant

Summary

Sorry to keep on opening small issues, but I have noticed another slightly odd behaviour that caught me out:

When restarting MD calculations, the decision of which restart file to use is made on the basis of the modification times of the restart files:

https://github.com/stfc/janus-core/blob/2b257d2c598dad88499d24757bfdb6388ac56ca4/janus_core/calculations/md.py#L813C55-L813C63

This means that when I copied an MD calculation to a new directory and tried to use a restart, it picked a different restart than I expected as the copy operation had randomised the modification times.

I suppose that this is not so common a scenario, but it was a bit confusing. I guess this one is a bit of a mater of taste, but would it be more robust to use the timesteps in the filenames to pick the best restart file to use?

Platform

Linux 5.14.0-611.27.1.el9_7.x86_64 x86_64 GNU/Linux

Version

0.8.6

Python version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions