Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Due to inactivity, this project is scheduled to be deleted on 2035-04-24.
Why is this scheduled?
Open sidebar
batsim
batsim
Commits
72fabb6f
Commit
72fabb6f
authored
Apr 14, 2017
by
Millian Poquet
Browse files
[test] dedicated test for killing jobs
parent
71d71cdb
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
72fabb6f
...
...
@@ -260,6 +260,12 @@ add_test(dynamic_submit
-bod /tmp/batsim_tests/dynamic_submit
-bwd
${
CMAKE_SOURCE_DIR
}
)
add_test
(
kill
${
CMAKE_SOURCE_DIR
}
/tools/experiments/execute_instances.py
${
CMAKE_SOURCE_DIR
}
/test/test_kill.yaml
-bod /tmp/batsim_tests/kill
-bwd
${
CMAKE_SOURCE_DIR
}
)
add_test
(
pybatsim_tests
${
CMAKE_SOURCE_DIR
}
/tools/experiments/execute_instances.py
${
CMAKE_SOURCE_DIR
}
/test/pybatsim_tests.yaml
...
...
test/test_kill.yaml
0 → 100644
View file @
72fabb6f
base_output_directory
:
/tmp/batsim_tests/kill
base_variables
:
batsim_dir
:
${base_working_directory}
implicit_instances
:
# Algorithms without parameters
noparam
:
sweep
:
platform
:
-
{
"
name"
:
"
homo128"
,
"
filename"
:
"
${batsim_dir}/platforms/energy_platform_homogeneous_no_net_128.xml"
}
workload
:
-
{
"
name"
:
"
hello"
,
"
filename"
:
"
${batsim_dir}/workload_profiles/test_workload_profile.json"
}
-
{
"
name"
:
"
medium_late"
,
"
filename"
:
"
${batsim_dir}/workload_profiles/batsim_paper_workload_example_late_job.json"
}
algo
:
-
{
"
name"
:
"
killer"
,
"
sched_name"
:
"
killer"
}
redis_enabled
:
[
"
true"
,
"
false"
]
generic_instance
:
timeout
:
3600
working_directory
:
${base_working_directory}
output_directory
:
${base_output_directory}/results/${instance_id}
batsim_command
:
batsim -p ${platform[filename]} -w ${workload[filename]} -E -e ${output_directory}/out --mmax-workload --config-file ${output_directory}/batsim.conf -vdebug
sched_command
:
batsched -v ${algo[sched_name]}
commands_before_execution
:
# Generate Batsim config file
-
|
#!/bin/bash
cat > ${output_directory}/batsim.conf << EOF
{
"redis": {
"enabled": ${redis_enabled}
},
"job_submission": {
"forward_profiles": true
}
}
EOF
commands_after_execution
:
# No job should have a higher runtime than 10+epsilon
-
|
#!/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 sys
# Let's get when jobs have been released
jobs = pd.read_csv('${output_directory}/out_jobs.csv')
epsilon = 0.1
max_runtime = 10 + epsilon
jobs_too_long = jobs.loc[jobs['execution_time'] > max_runtime]
if jobs_too_long.empty:
print('All jobs have been shorter than {} s'.format(max_runtime))
sys.exit(0)
else:
print('Some jobs were longer than {} s'.format(max_runtime))
print(jobs_too_long)
sys.exit(1)
EOF
-
chmod +x ${output_directory}/jobs_analysis.py
-
${output_directory}/jobs_analysis.py
commands_before_instances
:
-
${batsim_dir}/test/is_batsim_dir.py ${base_working_directory}
-
${batsim_dir}/test/clean_output_dir.py ${base_output_directory}
test/test_no_redis.yaml
View file @
72fabb6f
...
...
@@ -16,7 +16,6 @@ implicit_instances:
-
{
"
name"
:
"
easy_bf"
,
"
sched_name"
:
"
easy_bf"
}
-
{
"
name"
:
"
filler"
,
"
sched_name"
:
"
filler"
}
-
{
"
name"
:
"
conservative_bf"
,
"
sched_name"
:
"
conservative_bf"
}
-
{
"
name"
:
"
killer"
,
"
sched_name"
:
"
killer"
}
redis_enabled
:
[
"
false"
]
generic_instance
:
timeout
:
3600
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment