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
e1c4e1f8
"docs-source/usersguide/application.rst" did not exist on "e4ee9efdfce1969e937123954796ed3fa28fff34"
Unverified
Commit
e1c4e1f8
authored
Jan 16, 2023
by
Peter Eastman
Committed by
GitHub
Jan 16, 2023
Browse files
Fixed exceptions in benchmark script (#3912)
parent
4c2f3323
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
examples/benchmark.py
examples/benchmark.py
+3
-5
No files found.
examples/benchmark.py
View file @
e1c4e1f8
...
...
@@ -4,10 +4,11 @@ import openmm as mm
import
openmm.unit
as
unit
from
datetime
import
datetime
import
argparse
import
os
def
cpuinfo
():
"""Return CPU info"""
import
os
,
platform
,
subprocess
,
re
import
platform
,
subprocess
,
re
if
platform
.
system
()
==
"Windows"
:
return
platform
.
processor
()
elif
platform
.
system
()
==
"Darwin"
:
...
...
@@ -41,7 +42,6 @@ def appendTestResult(filename=None, test_result=None, system_info=None):
if
filename
is
None
:
return
import
os
all_results
=
{
'benchmarks'
:
list
()
}
if
system_info
is
not
None
:
all_results
[
'system'
]
=
system_info
...
...
@@ -266,7 +266,6 @@ def serializeTest(directory=None, system=None, integrator=None, state=None, core
metadata : dict
Metadata to dump to YAML
"""
import
os
os
.
makedirs
(
directory
,
exist_ok
=
True
)
import
openmm
def
serialize
(
obj
,
filename
):
...
...
@@ -512,7 +511,6 @@ for key, value in system_info.items():
if
args
.
outfile
is
not
None
:
# Remove output file
import
os
if
os
.
path
.
exists
(
args
.
outfile
):
os
.
unlink
(
args
.
outfile
)
# Write system info
...
...
@@ -561,4 +559,4 @@ elif args.style == 'table':
print
(
e
)
pass
else
:
raise
ValueError
(
f
"style
{
args
.
style
}
unkown; must be one of ['simple', 'table']"
)
raise
ValueError
(
f
"style
{
args
.
style
}
unk
n
own; must be one of ['simple', 'table']"
)
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