Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
3d62421b
"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "19c403f2c25b37e56bd68911104cab243d0b051e"
Unverified
Commit
3d62421b
authored
Jun 28, 2022
by
Peter Eastman
Committed by
GitHub
Jun 28, 2022
Browse files
Fixed freeze when using multiple GPUs (#3668)
parent
dd80fb3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
platforms/common/include/openmm/common/ComputeContext.h
platforms/common/include/openmm/common/ComputeContext.h
+5
-1
platforms/common/src/CommonKernels.cpp
platforms/common/src/CommonKernels.cpp
+2
-1
platforms/common/src/ComputeContext.cpp
platforms/common/src/ComputeContext.cpp
+5
-1
No files found.
platforms/common/include/openmm/common/ComputeContext.h
View file @
3d62421b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2019 Stanford University and the Authors.
*
* Portions copyright (c) 2019
-2022
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -555,6 +555,10 @@ public:
...
@@ -555,6 +555,10 @@ public:
* Get whether the worker thread has exited.
* Get whether the worker thread has exited.
*/
*/
bool
isFinished
();
bool
isFinished
();
/**
* Get whether the thread invoking this method is the worker thread.
*/
bool
isCurrentThread
();
/**
/**
* Block until all tasks have finished executing and the worker thread is idle.
* Block until all tasks have finished executing and the worker thread is idle.
*/
*/
...
...
platforms/common/src/CommonKernels.cpp
View file @
3d62421b
...
@@ -1812,7 +1812,8 @@ public:
...
@@ -1812,7 +1812,8 @@ public:
double
computeForceAndEnergy
(
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
double
computeForceAndEnergy
(
bool
includeForces
,
bool
includeEnergy
,
int
groups
)
{
if
((
groups
&
(
1
<<
force
->
getForceGroup
()))
==
0
)
if
((
groups
&
(
1
<<
force
->
getForceGroup
()))
==
0
)
return
0
;
return
0
;
cc
.
getWorkThread
().
flush
();
if
(
!
cc
.
getWorkThread
().
isCurrentThread
())
cc
.
getWorkThread
().
flush
();
Vec3
a
,
b
,
c
;
Vec3
a
,
b
,
c
;
cc
.
getPeriodicBoxVectors
(
a
,
b
,
c
);
cc
.
getPeriodicBoxVectors
(
a
,
b
,
c
);
double
volume
=
a
[
0
]
*
b
[
1
]
*
c
[
2
];
double
volume
=
a
[
0
]
*
b
[
1
]
*
c
[
2
];
...
...
platforms/common/src/ComputeContext.cpp
View file @
3d62421b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* *
* Portions copyright (c) 2019-202
1
Stanford University and the Authors. *
* Portions copyright (c) 2019-202
2
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Authors: Peter Eastman *
* Contributors: *
* Contributors: *
* *
* *
...
@@ -716,6 +716,10 @@ bool ComputeContext::WorkThread::isFinished() {
...
@@ -716,6 +716,10 @@ bool ComputeContext::WorkThread::isFinished() {
return
finished
;
return
finished
;
}
}
bool
ComputeContext
::
WorkThread
::
isCurrentThread
()
{
return
(
pthread_self
()
==
thread
);
}
void
ComputeContext
::
WorkThread
::
flush
()
{
void
ComputeContext
::
WorkThread
::
flush
()
{
pthread_mutex_lock
(
&
queueLock
);
pthread_mutex_lock
(
&
queueLock
);
while
(
!
waiting
)
while
(
!
waiting
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment