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
96e6c4bc
Commit
96e6c4bc
authored
Nov 04, 2014
by
peastman
Browse files
testInstallation.py gives more information about errors
parent
105b196e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
examples/testInstallation.py
examples/testInstallation.py
+8
-0
No files found.
examples/testInstallation.py
View file @
96e6c4bc
...
@@ -24,6 +24,7 @@ numPlatforms = Platform.getNumPlatforms()
...
@@ -24,6 +24,7 @@ numPlatforms = Platform.getNumPlatforms()
print
(
"There are"
,
numPlatforms
,
"Platforms available:"
)
print
(
"There are"
,
numPlatforms
,
"Platforms available:"
)
print
()
print
()
forces
=
[
None
]
*
numPlatforms
forces
=
[
None
]
*
numPlatforms
platformErrors
=
{}
for
i
in
range
(
numPlatforms
):
for
i
in
range
(
numPlatforms
):
platform
=
Platform
.
getPlatform
(
i
)
platform
=
Platform
.
getPlatform
(
i
)
print
(
i
+
1
,
platform
.
getName
(),
end
=
" "
)
print
(
i
+
1
,
platform
.
getName
(),
end
=
" "
)
...
@@ -36,6 +37,13 @@ for i in range(numPlatforms):
...
@@ -36,6 +37,13 @@ for i in range(numPlatforms):
print
(
"- Successfully computed forces"
)
print
(
"- Successfully computed forces"
)
except
:
except
:
print
(
"- Error computing forces with"
,
platform
.
getName
(),
"platform"
)
print
(
"- Error computing forces with"
,
platform
.
getName
(),
"platform"
)
platformErrors
[
platform
.
getName
()]
=
sys
.
exc_info
()[
1
]
# Give details of any errors.
for
platform
in
platformErrors
:
print
()
print
(
"%s platform error: %s"
%
(
platform
,
platformErrors
[
platform
]))
# See how well the platforms agree.
# See how well the platforms agree.
...
...
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