Unverified Commit 768963ae authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fixed incorrect context handling (#3339)

parent dc879951
...@@ -421,12 +421,12 @@ CudaContext::~CudaContext() { ...@@ -421,12 +421,12 @@ CudaContext::~CudaContext() {
delete bonded; delete bonded;
if (nonbonded != NULL) if (nonbonded != NULL)
delete nonbonded; delete nonbonded;
if (contextIsValid && !isLinkedContext)
cuProfilerStop();
popAsCurrent(); popAsCurrent();
string errorMessage = "Error deleting Context"; string errorMessage = "Error deleting Context";
if (contextIsValid && !isLinkedContext) { if (contextIsValid && !isLinkedContext)
cuProfilerStop();
cuCtxDestroy(context); cuCtxDestroy(context);
}
contextIsValid = false; contextIsValid = false;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment