Commit df10f331 authored by Maverick Chardet's avatar Maverick Chardet
Browse files

Sleep_time in sequential_test

parent ecaaa394
...@@ -131,10 +131,11 @@ def main(): ...@@ -131,10 +131,11 @@ def main():
config = load_config("concerto_config.json") config = load_config("concerto_config.json")
list_chain_length = config['list_chain_length'] list_chain_length = config['list_chain_length']
nb_repeats = config['nb_repeats'] nb_repeats = config['nb_repeats']
sleep_time = config['sleep_time']
run_experiments( run_experiments(
list_chain_length, nb_repeats, list_chain_length, nb_repeats,
sleep_time=0, sleep_time=sleep_time,
verbosity=-1, verbosity=-1,
printing=True, printing=True,
print_time=True, print_time=True,
......
{ {
"list_chain_length": [1, 5], "list_chain_length": [1, 5],
"sleep_time": 0.0,
"nb_repeats": 5 "nb_repeats": 5
} }
...@@ -7,7 +7,7 @@ from experiment_utilities.reserve_g5k import G5kReservation ...@@ -7,7 +7,7 @@ from experiment_utilities.reserve_g5k import G5kReservation
from experiment_utilities.concerto_g5k import ConcertoG5k from experiment_utilities.concerto_g5k import ConcertoG5k
def run_experiment(list_chain_length, nb_repeats, conf, working_directory, def run_experiment(list_chain_length, sleep_time, nb_repeats, conf, working_directory,
force_deployment=True, destroy=False): force_deployment=True, destroy=False):
with G5kReservation(conf, force_deployment, destroy) as g5k: with G5kReservation(conf, force_deployment, destroy) as g5k:
concerto_machine = g5k.get_hosts_info(role='concerto')[0] concerto_machine = g5k.get_hosts_info(role='concerto')[0]
...@@ -15,6 +15,7 @@ def run_experiment(list_chain_length, nb_repeats, conf, working_directory, ...@@ -15,6 +15,7 @@ def run_experiment(list_chain_length, nb_repeats, conf, working_directory,
concerto_config = { concerto_config = {
"concerto_host": concerto_machine, "concerto_host": concerto_machine,
"list_chain_length": list_chain_length, "list_chain_length": list_chain_length,
"sleep_time": sleep_time,
"nb_repeats": nb_repeats "nb_repeats": nb_repeats
} }
...@@ -33,7 +34,7 @@ def run_experiment(list_chain_length, nb_repeats, conf, working_directory, ...@@ -33,7 +34,7 @@ def run_experiment(list_chain_length, nb_repeats, conf, working_directory,
concerto_g5k.get_files(['stdout', 'stderr', 'results.gpl', 'results.json', 'times.json']) concerto_g5k.get_files(['stdout', 'stderr', 'results.gpl', 'results.json', 'times.json'])
def perform_experiment(list_chain_length: List[int], nb_repeats: int, def perform_experiment(list_chain_length: List[int], sleep_time: float, nb_repeats: int,
working_directory: str = 'exp'): working_directory: str = 'exp'):
import yaml import yaml
from os import makedirs from os import makedirs
...@@ -45,12 +46,13 @@ def perform_experiment(list_chain_length: List[int], nb_repeats: int, ...@@ -45,12 +46,13 @@ def perform_experiment(list_chain_length: List[int], nb_repeats: int,
with open(working_directory + '/g5k_config.yaml', 'w') as g5k_config_file: with open(working_directory + '/g5k_config.yaml', 'w') as g5k_config_file:
yaml.dump(conf, g5k_config_file) yaml.dump(conf, g5k_config_file)
run_experiment(list_chain_length, nb_repeats, conf, working_directory) run_experiment(list_chain_length, sleep_time, nb_repeats, conf, working_directory)
if __name__ == '__main__': if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
perform_experiment( perform_experiment(
list_chain_length=[1, 5, 25, 100], list_chain_length=[1, 5, 25, 100],
sleep_time=0,
nb_repeats=5 nb_repeats=5
) )
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