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
6269454b
Commit
6269454b
authored
Nov 04, 2014
by
peastman
Browse files
Merge pull request #700 from peastman/master
testInstallation.py gives more information about errors
parents
a8cd8456
96e6c4bc
Changes
1
Show 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 @
6269454b
...
...
@@ -24,6 +24,7 @@ numPlatforms = Platform.getNumPlatforms()
print
(
"There are"
,
numPlatforms
,
"Platforms available:"
)
print
()
forces
=
[
None
]
*
numPlatforms
platformErrors
=
{}
for
i
in
range
(
numPlatforms
):
platform
=
Platform
.
getPlatform
(
i
)
print
(
i
+
1
,
platform
.
getName
(),
end
=
" "
)
...
...
@@ -36,6 +37,13 @@ for i in range(numPlatforms):
print
(
"- Successfully computed forces"
)
except
:
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.
...
...
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