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
batsim
batsim
Commits
3e9a2c8f
Commit
3e9a2c8f
authored
Apr 14, 2017
by
Millian Poquet
Browse files
[test] same_submit_time: old_protocol -> json
parent
2099d328
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_same_submit_time.yaml
View file @
3e9a2c8f
...
...
@@ -23,20 +23,21 @@ implicit_instances:
working_directory
:
${base_working_directory}
output_directory
:
${base_output_directory}/results/${instance_id}
batsim_command
:
batsim -p ${platform[filename]} -w ${workload[filename]} -e ${output_directory}/out --redis-prefix ${instance_id} --mmax-workload -vnetwork-only
sched_command
:
batsched -v ${algo[algo_name]}
--redis-prefix ${instance_id}
sched_command
:
batsched -v ${algo[algo_name]}
commands_after_execution
:
-
cat ${output_directory}/batsim.stderr | grep -o ":S:.*|\|:S:.*'" > ${output_directory}/messages.txt
# Puts into messages.txt all JSON messages concerning job submissions
-
cat ${output_directory}/batsim.stderr | \grep -o "Sending '.*'" | \cut -d "'" -f2 | \grep 'JOB_SUBMITTED' > ${output_directory}/messages.txt
# Let's check that Batsim sent the jobs in the right order
-
|
#!/usr/bin/env bash
source ${output_directory}/variables.bash
cat > ${output_directory}/jobs_analysis.py <<EOF
#!/usr/bin/env python3
from __future__ import print_function
import json
import pandas as pd
import re
import sys
...
...
@@ -51,8 +52,15 @@ implicit_instances:
msg_file = open('${output_directory}/messages.txt')
msg_str = msg_file.read()
r = re.compile(''':S:.*?!(.*?)[|']''')
socket_order = [int(x) for x in r.findall(msg_str)]
msgs = msg_str.strip().split('\n')
socket_order = []
for msg in msgs:
json_msg = json.loads(msg)
for event in json_msg['events']:
if event['type'] == 'JOB_SUBMITTED':
job_str = event['data']['job_id']
socket_order.append(int(job_str.split('!')[1]))
print('Jobs orders:')
print(' Theoretical:', theoretical_order)
...
...
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