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

Improve robustness against OpenMMException (e.g. CUDA_ERROR_ILLEGAL_ADDRESS) #928

Open
jchodera opened this issue Jan 30, 2022 · 2 comments

Comments

@jchodera
Copy link
Member

cc #924 (comment)

We should implement some level of protection against these failures. One option is to wrap the whole simulation in a try...except block. That might be the most conservative, safest option, since we don't know how many CUDA contexts need to be invalidated if this occurs.

@mikemhenry
Copy link
Contributor

@mikemhenry
Copy link
Contributor

When using a different code entry point than the yaml, PointMutationExecutor the user will need to add the restart logic (for now, until we fix the api). I'll update the documentation but it will be something like:

retry_attempt = 0
MAX_ATTEMPTS = 5
while retry_attempt < MAX_ATTEMPTS:
    try:
        hss.extend(n_cycles)
    except OpenMMException as err:
        _logger.error(f"OpenMMException! {err}")
        retry_attempt += 1
        _logger.error(f"retry attempt {retry_attempt}/{MAX_ATTEMPTS}")
else:
    _logger.error(f"Failed to retry simulation in {MAX_ATTEMPTS} attempts")
    _logger.error(f"Will try one last time and not catch the exception")
    hss.extend(n_cycles)

also some changes to the minimizer may help as well with these errors:
choderalab/openmmtools#557

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.

3 participants