Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
1323b827
Commit
1323b827
authored
Jun 30, 2017
by
Konstantinos Chatzilygeroudis
Browse files
Fix wscripts for simplejson
parent
2b30f64f
Changes
3
Hide whitespace changes
Inline
Side-by-side
waf_tools/benchmarks.py
View file @
1323b827
import
os
,
glob
import
simplejson
import
stat
import
subprocess
import
time
import
threading
from
waflib
import
Logs
json_ok
=
True
try
:
import
simplejson
except
:
json_ok
=
False
Logs
.
pprint
(
'YELLOW'
,
'WARNING: simplejson not found some function may not work'
)
def
run_bo_benchmarks
(
ctx
):
HEADER
=
'
\033
[95m'
NC
=
'
\033
[0m'
...
...
@@ -37,6 +43,9 @@ def run_bo_benchmarks(ctx):
def
compile_regression_benchmarks
(
bld
,
json_file
):
if
not
json_ok
:
Logs
.
pprint
(
'RED'
,
'ERROR: simplejson is not installed and as such you cannot read the json configuration file for compiling the benchmarks.'
)
return
import
types
def
convert
(
name
):
...
...
@@ -251,6 +260,10 @@ def run_regression_benchmarks(ctx):
HEADER
=
'
\033
[95m'
NC
=
'
\033
[0m'
if
not
json_ok
:
Logs
.
pprint
(
'RED'
,
'ERROR: simplejson is not installed and as such you cannot read the json configuration file for running the benchmarks.'
)
return
if
not
ctx
.
options
.
regression_benchmarks
:
Logs
.
pprint
(
'RED'
,
'ERROR: No json file with configurations is provided. Nothing will run!'
)
return
...
...
waf_tools/limbo.py
View file @
1323b827
...
...
@@ -279,6 +279,9 @@ def run_local_one(directory, s):
retcode
=
subprocess
.
call
(
s
,
shell
=
True
,
env
=
None
,
stdout
=
std_out
,
stderr
=
std_err
)
def
run_local
(
conf_file
,
serial
=
True
):
if
not
json_ok
:
Logs
.
pprint
(
'RED'
,
'ERROR: simplejson is not installed and as such you cannot read the json configuration file for running your experiments.'
)
return
fnames
,
arguments
=
_sub_script_local
(
conf_file
)
threads
=
[]
for
(
fname
,
directory
)
in
fnames
:
...
...
@@ -313,6 +316,9 @@ def qsub(conf_file):
export LD_LIBRARY_PATH=@ld_lib_path
exec @exec
"""
if
not
json_ok
:
Logs
.
pprint
(
'RED'
,
'ERROR: simplejson is not installed and as such you cannot read the json configuration file for running your experiments.'
)
return
fnames
=
_sub_script
(
tpl
,
conf_file
)
for
(
fname
,
directory
)
in
fnames
:
s
=
"qsub -d "
+
directory
+
" "
+
fname
...
...
@@ -330,6 +336,9 @@ def oar(conf_file):
export LD_LIBRARY_PATH=@ld_lib_path
exec @exec
"""
if
not
json_ok
:
Logs
.
pprint
(
'RED'
,
'ERROR: simplejson is not installed and as such you cannot read the json configuration file for running your experiments.'
)
return
Logs
.
pprint
(
'YELLOW'
,
'WARNING [oar]: MPI not supported yet'
)
fnames
=
_sub_script
(
tpl
,
conf_file
)
for
(
fname
,
directory
)
in
fnames
:
...
...
wscript
View file @
1323b827
...
...
@@ -165,7 +165,7 @@ def build(bld):
bld
.
recurse
(
'exp/'
+
i
)
limbo
.
output_params
(
'exp/'
+
i
)
if
bld
.
options
.
regression_benchmarks
:
limbo
.
compile_regression_benchmarks
(
bld
,
bld
.
options
.
regression_benchmarks
)
benchmarks
.
compile_regression_benchmarks
(
bld
,
bld
.
options
.
regression_benchmarks
)
bld
.
add_post_fun
(
limbo
.
summary
)
def
build_extensive_tests
(
ctx
):
...
...
Write
Preview
Supports
Markdown
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