Last active
May 5, 2017 08:35
-
-
Save lbarallon/b547144989485c3a4be2eb2e4c6e1a31 to your computer and use it in GitHub Desktop.
Yaml config for msg bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_output_directory: /tmp/batsim_tools_tests/test_msg | |
base_variables: | |
batsim_dir: ${base_working_directory} | |
implicit_instances: | |
implicit: | |
sweep: | |
platform : | |
- {"name":"cluster", "filename":"${batsim_dir}/platforms/cluster512.xml"} | |
workload : | |
- {"name":"msg_bug", "filename":"${batsim_dir}/workload_profiles/msg_bug.json"} | |
pybatsim_algo: | |
- {"name":"filler", "algo_name":"fillerSched"} | |
generic_instance: | |
working_directory: ${base_working_directory} | |
output_directory: ${base_output_directory}/results/${workload[name]}_${platform[name]} | |
batsim_command: batsim -p ${platform["filename"]} -w ${workload["filename"]} -e ${output_directory}/out -m master_host0 --batexec | |
sched_command: python2 ${batsim_dir}/schedulers/pybatsim/launcher.py ${pybatsim_algo[algo_name]} | |
# commands_before_execution: | |
commands_after_execution: | |
- | | |
#!/bin/bash | |
cat ${output_directory}/out_schedule.csv | cut -d',' -f2 | tail -n 1 >> ${output_directory}/makespan | |
cat ${output_directory}/out_schedule.csv | cut -d',' -f15 | tail -n 1 >> ${output_directory}/simulation_time | |
# These commands will be executed before running the instances, in this order | |
commands_before_instances: | |
- ${batsim_dir}/test/is_batsim_dir.py ${base_working_directory} | |
- ${batsim_dir}/test/clean_output_dir.py ${base_output_directory} | |
# These commands will be executed after running all the instances, in this order | |
commands_after_instances: | |
- | | |
#!/bin/bash | |
result_directory=${base_output_directory}/results | |
result_file=$result_directory/out_cg.csv | |
rm -f $result_file | |
echo "agregation,makespan,simulation_time" >> $result_file | |
tests=`find $result_directory/* -maxdepth 0 -type d` | |
for test in $tests | |
do | |
agregation=$(echo $test | cut -d"/" -f6 | cut -d"_" -f4) | |
nb_line=$(cat $test/makespan | wc -l) | |
for instance in `seq 1 $nb_line`; do | |
echo "$agregation,\ | |
`cat $test/makespan | head -n $instance | tail -n1`,\ | |
`cat $test/simulation_time | head -n $instance | tail -n1`" >> $result_file | |
done | |
done | |
# echo "something" >> $result_file | |
- echo -e "\n--- end of instance ---\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment