Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DetectorWriteSim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EWMSCP
DetectorWriteSim
Commits
88f83bcf
Commit
88f83bcf
authored
1 year ago
by
Michael Reuscher
Browse files
Options
Downloads
Patches
Plain Diff
to simrunner add output for returncode and errors
parent
2d990982
No related branches found
No related tags found
1 merge request
!4
Python driver and data analysis part
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
simrunner/data_config.json
+1
-0
1 addition, 0 deletions
simrunner/data_config.json
simrunner/simrunner.py
+8
-3
8 additions, 3 deletions
simrunner/simrunner.py
with
9 additions
and
3 deletions
simrunner/data_config.json
+
1
−
0
View file @
88f83bcf
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
"-N"
:
"4"
},
"-N"
:
"4"
},
"data_set_2"
:{
"data_set_2"
:{
"--posixDataDir"
:
"protokoll"
,
"--posixDataDir"
:
"protokoll"
,
"-q"
:
"20"
,
"-n"
:
"20"
,
"-n"
:
"20"
,
"-s"
:
"1M"
,
"-s"
:
"1M"
,
"-i"
:
"0.1s"
,
"-i"
:
"0.1s"
,
...
...
This diff is collapsed.
Click to expand it.
simrunner/simrunner.py
+
8
−
3
View file @
88f83bcf
...
@@ -12,8 +12,10 @@ def read_config():
...
@@ -12,8 +12,10 @@ def read_config():
def
start_process
(
program_path
,
arguments
):
def
start_process
(
program_path
,
arguments
):
command
=
[
program_path
]
+
arguments
command
=
[
program_path
]
+
arguments
process
=
subprocess
.
run
(
command
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
result
=
subprocess
.
run
(
command
,
capture_output
=
True
,
text
=
True
)
return
process
output
=
result
.
stdout
errors
=
result
.
stderr
return
output
,
errors
,
result
.
returncode
def
set_arguments
(
data_config
):
def
set_arguments
(
data_config
):
...
@@ -38,8 +40,11 @@ def run_sim(e_list, d_path, s_path):
...
@@ -38,8 +40,11 @@ def run_sim(e_list, d_path, s_path):
os
.
makedirs
(
relativ_path
,
mode
=
0o777
,
exist_ok
=
True
)
os
.
makedirs
(
relativ_path
,
mode
=
0o777
,
exist_ok
=
True
)
event
[
-
1
]
=
relativ_path
event
[
-
1
]
=
relativ_path
arguments
=
event
arguments
=
event
output
=
start_process
(
s_path
,
arguments
)
output
,
errors
,
return_code
=
start_process
(
s_path
,
arguments
)
print
(
output
)
print
(
output
)
print
(
errors
)
if
return_code
>
0
:
print
(
return_code
)
# --- MAIN ---
# --- MAIN ---
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment