openmmtools icon indicating copy to clipboard operation
openmmtools copied to clipboard

[WIP] Add explicit deletion to contexts in ContextCache on empty

Open dotsdl opened this issue 1 year ago • 6 comments

Description

Note: this may not be sufficient; will need to investigate that it actually succeeds in clearing contexts.

Todos

  • [ ] Implement feature / fix bug
  • [ ] Add tests
  • [ ] Update documentation as needed
  • [ ] Update changelog to summarize changes in behavior, enhancements, and bugfixes implemented in this PR

Status

  • [ ] Ready to go

Changelog message


dotsdl avatar Apr 20 '23 15:04 dotsdl

Codecov Report

Merging #690 (49f2e1d) into main (b379af3) will increase coverage by 0.00%. The diff coverage is 100.00%.

codecov[bot] avatar Apr 20 '23 18:04 codecov[bot]

This may not be finished yet; please do not merge.

dotsdl avatar Apr 22 '23 01:04 dotsdl

This should address https://github.com/choderalab/openmmtools/issues/688

jchodera avatar Apr 22 '23 02:04 jchodera

We want to write tests that creates many context caches and make sure that the resources of the GPU don't get depleted (if we are emptying the context cache correctly). First we test this locally and then in the GPU CI.

We need GPU CI testing for this.

ijpulidos avatar May 25 '23 19:05 ijpulidos

After the basic test we can also create a replica exchange sampler test where we create and destroy many repex samplers and check if the GPU resources are correctly handled.

Minimizers might be creating their own context. We can give it a pre-minimized structure or tell it to do only one minimization step (using the multistatesampler minimize method)

ijpulidos avatar May 25 '23 19:05 ijpulidos

We also need a __del__ that calls empty().

jchodera avatar Jun 13 '23 15:06 jchodera