openmmexampleplugin icon indicating copy to clipboard operation
openmmexampleplugin copied to clipboard

CUDA tests failing

Open craabreu opened this issue 2 years ago • 1 comments

The ExampleForce tests fail in the CUDA platform when executing the following line:

https://github.com/openmm/openmmexampleplugin/blob/6340817d2c53105c0cb8c862d83653b7ebc079db/platforms/common/src/CommonExampleKernels.cpp#L83

I compiled both OpenMM and this plugin with the same GCC compiler (version 11.2.0) and CudaToolkit installation (version 11.7).

The error message I get is:

exception: Error uploading array bondParams: CUDA_ERROR_INVALID_CONTEXT (201)

craabreu avatar Jun 26 '22 16:06 craabreu

I can only guess about what might be causing it. Most likely it isn't really related to that line. Something went wrong earlier, and that's just the first place it got noticed. Here are a few possibilities.

  • If you put your computer to sleep and wake it up, that can cause existing contexts to be reset.
  • It might be caused by an incompatibility between your CUDA driver and toolkit, or alternatively between pieces of code compiled against different toolkit versions. What driver do you have? And make sure you're really using the toolkit you think you are. If you have multiple toolkits on your computer (such as one from the NVIDIA installer and one from conda), it might be picking up a different one.
  • Sometimes things just get messed up for no obvious reason! Rebooting usually fixes them.

peastman avatar Jun 28 '22 17:06 peastman