forked from ANRGUSC/saga
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
68 lines (55 loc) · 2.07 KB
/
Copy pathmain.py
File metadata and controls
68 lines (55 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import logging # pylint: disable=missing-module-docstring
import pathlib
from itertools import product
from saga.schedulers import (BILScheduler, CpopScheduler, DuplexScheduler,
ETFScheduler, FastestNodeScheduler, FCPScheduler,
FLBScheduler, GDLScheduler, HeftScheduler,
MaxMinScheduler, MCTScheduler, METScheduler,
MinMinScheduler, OLBScheduler, WBAScheduler)
from saga.pisa import run_experiments
thisdir = pathlib.Path(__file__).parent
logging.basicConfig(level=logging.INFO)
# set logging format [time] [level] message
logging.basicConfig(format='[%(asctime)s] [%(levelname)s] %(message)s')
# algorithms that only work when the compute speed is the same for all nodes
homogenous_comp_algs = {"ETF", "FCP", "FLB"}
# algorithms that only work when the communication speed is the same for all network edges
homogenous_comm_algs = {"BIL", "GDL", "FCP", "FLB"}
rerun_schedulers = ["FLB"]
rerun_base_schedulers = []
SCHEDULERS = {
"CPOP": CpopScheduler(),
"HEFT": HeftScheduler(),
"Duplex": DuplexScheduler(),
"ETF": ETFScheduler(),
"FastestNode": FastestNodeScheduler(),
"FCP": FCPScheduler(),
"GDL": GDLScheduler(),
"MaxMin": MaxMinScheduler(),
"MinMin": MinMinScheduler(),
"MCT": MCTScheduler(),
"MET": METScheduler(),
"OLB": OLBScheduler(),
"BIL": BILScheduler(),
"WBA": WBAScheduler(),
"FLB": FLBScheduler(),
}
def run(output_path: pathlib.Path): # pylint: disable=too-many-locals, too-many-statements
"""Run first set of experiments."""
scheduler_pairs = list(product(SCHEDULERS.items(), SCHEDULERS.items()))
run_experiments(
scheduler_pairs=scheduler_pairs,
max_iterations=1000,
num_tries=10,
max_temp=10,
min_temp=0.1,
cooling_rate=0.99,
skip_existing=True,
output_path=output_path
)
def main():
logging.basicConfig(level=logging.INFO)
resultsdir = thisdir.joinpath("results")
run(resultsdir)
if __name__ == "__main__":
main()