Commit 26ac7b49 authored by Steffen Lackner's avatar Steffen Lackner
Browse files

[test,submodules] Add test for send/recv; update pybatsim

parent 9fea5825
......@@ -329,3 +329,9 @@ add_test(fewer_resources
${CMAKE_SOURCE_DIR}/test/test_fewer_resources.yaml
-bod /tmp/fewer_resources
-bwd ${CMAKE_SOURCE_DIR})
add_test(send_recv
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/test/test_send_recv.yaml
-bod /tmp/send_recv
-bwd ${CMAKE_SOURCE_DIR})
pybatsim @ 0a180a52
Subproject commit 3dd3fc0f2c995f2afb75e26759e1c4ef50a645f3
Subproject commit 0a180a524c9544fe1b6a7ba376107ad420ae0e4e
# This script should be called from Batsim's root directory
# If needed, the working directory of this script can be specified within this file
#base_working_directory: ~/proj/batsim
# If needed, the output directory of this script can be specified within this file
base_output_directory: /tmp/batsim_tests/send_recv
base_variables:
batsim_dir: ${base_working_directory}
implicit_instances:
implicit:
sweep:
platform :
- {"name":"no_energy", "filename":"${batsim_dir}/platforms/simple_coalloc_platform.xml"}
workload :
- {"name":"workload", "filename":"${batsim_dir}/workload_profiles/test_simple_send_recv.json"}
algo:
- {"name":"SendRecv", "sched_name":"${batsim_dir}/schedulers/pybatsim/schedulers/schedSendRecv.py"}
generic_instance:
timeout: 10
working_directory: ${base_working_directory}
output_directory: ${base_output_directory}/results/${algo[name]}_${workload[name]}_${platform[name]}
batsim_command: batsim -p ${platform[filename]} -w ${workload[filename]} -e ${output_directory}/out --mmax-workload --config-file ${output_directory}/batsim.conf
sched_command: pybatsim -p ${algo[sched_name]} --options-file ${output_directory}/sched_input.json
commands_before_execution:
# Batsim config file
- |
#!/usr/bin/env bash
cat > ${output_directory}/batsim.conf << EOF
{
"redis": {
"enabled": false,
"hostname": "127.0.0.1",
"port": 6379,
"prefix": "default"
},
"job_submission": {
"forward_profiles": true,
"from_scheduler": {
"enabled": true,
"acknowledge": true
}
}
}
EOF
#!/usr/bin/env bash
cat > ${output_directory}/sched_input.json << EOF
{
"export-prefix": "${output_directory}/out"
}
EOF
commands_before_instances:
- ${batsim_dir}/test/is_batsim_dir.py ${base_working_directory}
- ${batsim_dir}/test/clean_output_dir.py ${base_output_directory}
{
"version": 0,
"command:": "",
"date": "Tue, 19 Dec 2017 9:44:30 +0100",
"description": "workload to test send and receive profiles",
"nb_res": 7,
"jobs": [
{"id":0, "subtime":0, "walltime": 100, "res": 2, "profile": "p.composed.accept"},
{"id":1, "subtime":0.1, "walltime": 100, "res": 6, "profile": "p.composed.accept"},
{"id":2, "subtime":0.1, "walltime": 500, "res": 1, "profile": "p.composed.accept"},
{"id":3, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.fail"},
{"id":4, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.fail"},
{"id":5, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.accept"},
{"id":6, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.accept"},
{"id":7, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.fail"},
{"id":8, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.accept"},
{"id":9, "subtime":0.2, "walltime": 100, "res": 1, "profile": "p.composed.accept"}
],
"profiles": {
"p.composed.accept": {
"type": "composed",
"seq": [
"p.delay",
"p.send.accept",
"p.recv"
]
},
"p.composed.fail": {
"type": "composed",
"seq": [
"p.delay",
"p.send.fail",
"p.recv"
]
},
"p.delay": {
"delay": 10,
"type": "delay"
},
"p.failure": {
"delay": 0.1,
"type": "delay",
"ret": 1
},
"p.send.accept": {
"type": "send",
"msg": {
"type": "accept",
"payload": "Some data"
}
},
"p.send.fail": {
"type": "send",
"msg": {
"type": "fail",
"payload": "Some other data"
}
},
"p.recv": {
"type": "recv",
"regex": "accepted",
"failure": "p.failure"
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment