Commit 07480ecb authored by Millian Poquet's avatar Millian Poquet
Browse files

[misc] energy_small example

parent 20aa2ded
......@@ -69,7 +69,7 @@ implicit_instances:
-p ${output_directory}/out_pstate_changes.csv \
--off 13 --switchon -1 --switchoff -2 \
--names Example \
-o ${output_directory}/energy_plot.png
-o ${output_directory}/energy_plot.pdf
commands_before_instances:
- ${batsim_dir}/test/is_batsim_dir.py ${base_working_directory}
......
# 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/energy_small
base_variables:
batsim_dir: ${base_working_directory}
evalys_dir: ${EVALYS_DIR}
do_per_instance_plots: 1
implicit_instances:
################################################################################
inertial:
################################################################################
sweep:
platform :
- {"name":"homo128", "filename":"${batsim_dir}/platforms/energy_platform_homogeneous_no_net_128.xml"}
workload :
- {"name":"energy_small", "filename":"${batsim_dir}/workload_profiles/energy_small.json"}
algo:
- {"name":"inertial_shutdown", "sched_name":"energy_bf_monitoring_inertial"}
llh_bound: [500]
generic_instance:
variables:
instance_name: inertial
timeout: 10
working_directory: ${base_working_directory}
output_directory: ${base_output_directory}/results/${instance_name}
batsim_command: batsim -p ${platform[filename]} -w ${workload[filename]} -E -e ${output_directory}/${instance_name} --mmax-workload
sched_command: batsched -v ${algo[sched_name]} --variant_options_filepath ${output_directory}/sched_input.json
commands_before_execution:
# Generate sched options
- |
#!/usr/bin/env bash
# Since bash associative arrays are not exported, the variables.bash
# is sourced here.
source ${output_directory}/variables.bash
# Let's generate an input file for the scheduler
cat > ${output_directory}/sched_input.json << EOF
{
"output_dir":"${output_directory}",
"trace_output_filename":"${output_directory}/${instance_name}_sched_load_log.csv",
"inertial_alteration":"p1",
"upper_llh_threshold":${llh_bound},
"monitoring_period":300,
"idle_time_to_sedate":1e18,
"sedate_idle_on_classical_events":false,
"ensured_sleep_time_lower_bound":0,
"ensured_sleep_time_upper_bound":0,
"power_sleep":9.75,
"power_idle":95,
"energy_switch_on":19030,
"power_compute":190.738,
"energy_switch_off":620,
"time_switch_off":6.1,
"pstate_sleep":13,
"pstate_compute":0,
"time_switch_on":152
}
EOF
commands_after_execution:
# Generate plot with evalys
- |
if [ ${do_per_instance_plots} -eq 1 ]
then
${evalys_dir}/examples/poquetm/plot_energy_info.py \
--gantt --llh \
-e ${output_directory}/${instance_name}_consumed_energy.csv \
-j ${output_directory}/${instance_name}_jobs.csv \
-p ${output_directory}/${instance_name}_pstate_changes.csv \
-l ${output_directory}/${instance_name}_sched_load_log.csv \
--off 13 --switchon -1 --switchoff -2 \
--names ${instance_name} \
--llh-bound ${llh_bound} \
-o ${output_directory}/${instance_name}_energy_plot.pdf
fi
################################################################################
opportunistic:
################################################################################
sweep:
platform :
- {"name":"homo128", "filename":"${batsim_dir}/platforms/energy_platform_homogeneous_no_net_128.xml"}
workload :
- {"name":"energy_small", "filename":"${batsim_dir}/workload_profiles/energy_small.json"}
algo:
- {"name":"opportunistic", "sched_name":"energy_bf_idle_sleeper"}
generic_instance:
variables:
instance_name: opportunistic
timeout: 10
working_directory: ${base_working_directory}
output_directory: ${base_output_directory}/results/${instance_name}
batsim_command: batsim -p ${platform[filename]} -w ${workload[filename]} -E -e ${output_directory}/${instance_name} --mmax-workload
sched_command: batsched -v ${algo[sched_name]} --variant_options_filepath ${output_directory}/sched_input.json
commands_before_execution:
# Generate sched options
- |
#!/usr/bin/env bash
# Since bash associative arrays are not exported, the variables.bash
# is sourced here.
source ${output_directory}/variables.bash
# Let's generate an input file for the scheduler
cat > ${output_directory}/sched_input.json << EOF
{
"output_dir":"${output_directory}",
"trace_output_filename":"${output_directory}/${instance_name}_sched_load_log.csv",
"fraction_of_machines_to_let_awake": 1,
"idle_time_to_sedate":0,
"monitoring_period":300,
"sedate_idle_on_classical_events":false,
"ensured_sleep_time_lower_bound":0,
"ensured_sleep_time_upper_bound":0,
"power_sleep":9.75,
"power_idle":95,
"energy_switch_on":19030,
"power_compute":190.738,
"energy_switch_off":620,
"time_switch_off":6.1,
"pstate_sleep":13,
"pstate_compute":0,
"time_switch_on":152
}
EOF
commands_after_execution:
# Generate plot with evalys
- |
if [ ${do_per_instance_plots} -eq 1 ]
then
${evalys_dir}/examples/poquetm/plot_energy_info.py \
--gantt --llh \
-e ${output_directory}/${instance_name}_consumed_energy.csv \
-j ${output_directory}/${instance_name}_jobs.csv \
-p ${output_directory}/${instance_name}_pstate_changes.csv \
-l ${output_directory}/${instance_name}_sched_load_log.csv \
--off 13 --switchon -1 --switchoff -2 \
--names ${instance_name} \
-o ${output_directory}/${instance_name}_energy_plot.pdf
fi
################################################################################
inertial_os:
################################################################################
sweep:
platform :
- {"name":"homo128", "filename":"${batsim_dir}/platforms/energy_platform_homogeneous_no_net_128.xml"}
workload :
- {"name":"energy_small", "filename":"${batsim_dir}/workload_profiles/energy_small.json"}
algo:
- {"name":"inertial_shutdown", "sched_name":"energy_bf_monitoring_inertial"}
llh_bound: [500]
generic_instance:
variables:
instance_name: inertial_os
timeout: 10
working_directory: ${base_working_directory}
output_directory: ${base_output_directory}/results/${instance_name}
batsim_command: batsim -p ${platform[filename]} -w ${workload[filename]} -E -e ${output_directory}/${instance_name} --mmax-workload
sched_command: batsched -v ${algo[sched_name]} --variant_options_filepath ${output_directory}/sched_input.json
commands_before_execution:
# Generate sched options
- |
#!/usr/bin/env bash
# Since bash associative arrays are not exported, the variables.bash
# is sourced here.
source ${output_directory}/variables.bash
# Let's generate an input file for the scheduler
cat > ${output_directory}/sched_input.json << EOF
{
"output_dir":"${output_directory}",
"trace_output_filename":"${output_directory}/${instance_name}_sched_load_log.csv",
"inertial_alteration":"p1",
"upper_llh_threshold":${llh_bound},
"monitoring_period":300,
"idle_time_to_sedate":0,
"sedate_idle_on_classical_events":false,
"ensured_sleep_time_lower_bound":0,
"ensured_sleep_time_upper_bound":0,
"power_sleep":9.75,
"power_idle":95,
"energy_switch_on":19030,
"power_compute":190.738,
"energy_switch_off":620,
"time_switch_off":6.1,
"pstate_sleep":13,
"pstate_compute":0,
"time_switch_on":152
}
EOF
commands_after_execution:
# Generate plot with evalys
- |
if [ ${do_per_instance_plots} -eq 1 ]
then
${evalys_dir}/examples/poquetm/plot_energy_info.py \
--gantt --llh \
-e ${output_directory}/${instance_name}_consumed_energy.csv \
-j ${output_directory}/${instance_name}_jobs.csv \
-p ${output_directory}/${instance_name}_pstate_changes.csv \
-l ${output_directory}/${instance_name}_sched_load_log.csv \
--off 13 --switchon -1 --switchoff -2 \
--names ${instance_name} \
--llh-bound ${llh_bound} \
-o ${output_directory}/${instance_name}_energy_plot.pdf
fi
################################################################################
proportional:
################################################################################
sweep:
platform :
- {"name":"homo128", "filename":"${batsim_dir}/platforms/energy_platform_homogeneous_no_net_128.xml"}
workload :
- {"name":"energy_small", "filename":"${batsim_dir}/workload_profiles/energy_small.json"}
algo:
- {"name":"proportional", "sched_name":"energy_bf_subpart_sleeper"}
generic_instance:
variables:
instance_name: proportional
timeout: 10
working_directory: ${base_working_directory}
output_directory: ${base_output_directory}/results/${instance_name}
batsim_command: batsim -p ${platform[filename]} -w ${workload[filename]} -E -e ${output_directory}/${instance_name} --mmax-workload
sched_command: batsched -v ${algo[sched_name]} --variant_options_filepath ${output_directory}/sched_input.json
commands_before_execution:
# Generate sched options
- |
#!/usr/bin/env bash
# Since bash associative arrays are not exported, the variables.bash
# is sourced here.
source ${output_directory}/variables.bash
# Let's generate an input file for the scheduler
cat > ${output_directory}/sched_input.json << EOF
{
"output_dir":"${output_directory}",
"trace_output_filename":"${output_directory}/${instance_name}_sched_load_log.csv",
"fraction_of_machines_to_let_awake": 0.34,
"idle_time_to_sedate":1e18,
"monitoring_period":300,
"sedate_idle_on_classical_events":false,
"ensured_sleep_time_lower_bound":0,
"ensured_sleep_time_upper_bound":0,
"power_sleep":9.75,
"power_idle":95,
"energy_switch_on":19030,
"power_compute":190.738,
"energy_switch_off":620,
"time_switch_off":6.1,
"pstate_sleep":13,
"pstate_compute":0,
"time_switch_on":152
}
EOF
commands_after_execution:
# Generate plot with evalys
- |
if [ ${do_per_instance_plots} -eq 1 ]
then
${evalys_dir}/examples/poquetm/plot_energy_info.py \
--gantt --ru \
-e ${output_directory}/${instance_name}_consumed_energy.csv \
-j ${output_directory}/${instance_name}_jobs.csv \
-p ${output_directory}/${instance_name}_pstate_changes.csv \
-l ${output_directory}/${instance_name}_sched_load_log.csv \
-m ${output_directory}/${instance_name}_machine_states.csv \
--off 13 --switchon -1 --switchoff -2 \
--names ${instance_name} \
-o ${output_directory}/${instance_name}_energy_plot.pdf
fi
commands_before_instances:
- ${batsim_dir}/test/is_batsim_dir.py ${base_working_directory}
- ${batsim_dir}/test/clean_output_dir.py ${base_output_directory}
commands_after_instances:
# All gantt charts with evalys
- |
pre1=${base_output_directory}/results/opportunistic/opportunistic
pre2=${base_output_directory}/results/inertial/inertial
pre3=${base_output_directory}/results/inertial_os/inertial_os
pre4=${base_output_directory}/results/proportional/proportional
${evalys_dir}/examples/poquetm/plot_energy_info.py \
--gantt \
--names opportunistic inertial 'inertial opportunistic' proportional \
-e ${pre1}_consumed_energy.csv \
${pre2}_consumed_energy.csv \
${pre3}_consumed_energy.csv \
${pre4}_consumed_energy.csv \
-j ${pre1}_jobs.csv \
${pre2}_jobs.csv \
${pre3}_jobs.csv \
${pre4}_jobs.csv \
-p ${pre1}_pstate_changes.csv \
${pre2}_pstate_changes.csv \
${pre3}_pstate_changes.csv \
${pre4}_pstate_changes.csv \
-l ${pre1}_sched_load_log.csv \
${pre2}_sched_load_log.csv \
${pre3}_sched_load_log.csv \
${pre4}_sched_load_log.csv \
--off 13 --switchon -1 --switchoff -2 \
-o ${base_output_directory}/energy_plot.pdf
......@@ -9,8 +9,8 @@
"nb_res": 1,
"jobs": [
{"id":0, "subtime":0, "walltime": 15, "res": 1, "profile": "msg_hg_10"},
{"id":1, "subtime":100, "walltime": 15, "res": 1, "profile": "msg_hg_10"}
{"id":0, "subtime":0, "walltime": 1000, "res": 1, "profile": "msg_hg_10"},
{"id":1, "subtime":100, "walltime": 1000, "res": 1, "profile": "msg_hg_10"}
],
"profiles": {
......@@ -20,7 +20,7 @@
},
"msg_hg_10": {
"type": "msg_par_hg",
"cpu": 1e9,
"cpu": 4e9,
"com": 0
}
}
......
This diff is collapsed.
Supports Markdown
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