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
eb5a680d
"...reference/src/SimTKReference/ReferenceCCMAAlgorithm.h" did not exist on "2cfc68215e38966587f6dbfbcf6918f04c363a86"
Commit
eb5a680d
authored
Oct 25, 2015
by
Robert McGibbon
Browse files
code review
parent
4930cd8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+4
-4
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
eb5a680d
...
@@ -132,8 +132,8 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
...
@@ -132,8 +132,8 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
this
->
deviceIndex
=
-
1
;
this
->
deviceIndex
=
-
1
;
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
devicePrecedence
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
devicePrecedence
.
size
());
i
++
)
{
d
eviceIndex
=
devicePrecedence
[
i
];
int
trialD
eviceIndex
=
devicePrecedence
[
i
];
CHECK_RESULT
(
cuDeviceGet
(
&
device
,
d
eviceIndex
));
CHECK_RESULT
(
cuDeviceGet
(
&
device
,
trialD
eviceIndex
));
defaultOptimizationOptions
=
"--use_fast_math"
;
defaultOptimizationOptions
=
"--use_fast_math"
;
unsigned
int
flags
=
CU_CTX_MAP_HOST
;
unsigned
int
flags
=
CU_CTX_MAP_HOST
;
if
(
useBlockingSync
)
if
(
useBlockingSync
)
...
@@ -142,12 +142,12 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
...
@@ -142,12 +142,12 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
flags
+=
CU_CTX_SCHED_SPIN
;
flags
+=
CU_CTX_SCHED_SPIN
;
if
(
cuCtxCreate
(
&
context
,
flags
,
device
)
==
CUDA_SUCCESS
)
{
if
(
cuCtxCreate
(
&
context
,
flags
,
device
)
==
CUDA_SUCCESS
)
{
this
->
deviceIndex
=
d
eviceIndex
;
this
->
deviceIndex
=
trialD
eviceIndex
;
break
;
break
;
}
}
}
}
if
(
this
->
deviceIndex
==
-
1
)
if
(
this
->
deviceIndex
==
-
1
)
if
(
device
Precedence
.
size
()
=
=
1
)
if
(
device
Index
!
=
-
1
)
throw
OpenMMException
(
"The requested CUDA device could not be loaded"
);
throw
OpenMMException
(
"The requested CUDA device could not be loaded"
);
else
else
throw
OpenMMException
(
"No compatible CUDA device is available"
);
throw
OpenMMException
(
"No compatible CUDA device is available"
);
...
...
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