示例#1
0
 def test_mcts_scheduler(self):
     lgs = {'lofar_std.json': 450}
     mdp = 4
     for lgn, deadline in lgs.items():
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pssa01 = MCTSScheduler(drop_list, max_dop=mdp, max_calc_time=0.25)
         pssa01.partition_dag()
示例#2
0
 def test_pg_eagle(self):
     lgs = [
         'eagle_gather_simple.json', 'eagle_gather_empty.json',
         'eagle_gather.json'
     ]
     for lg in lgs:
         fp = get_lg_fname(lg)
         lg = LG(fp)
         lg.unroll_to_tpl()
示例#3
0
 def test_minnumparts_scheduler(self):
     lgs = {'cont_img.json': 500, 'cont_img.json': 200, 'test_grpby_gather.json': 90, 'chiles_simple.json': 160}
     mdp = 8
     ofa = 0.5
     for lgn, deadline in lgs.items():
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         mps = MinNumPartsScheduler(drop_list, deadline, max_dop=mdp, optimistic_factor=ofa)
         mps.partition_dag()
示例#4
0
 def test_metis_pgtp(self):
     lgnames = [
         'lofar_std.json', 'test_grpby_gather.json', 'chiles_simple.json'
     ]
     tgt_partnum = [15, 15, 10, 10, 5]
     for i, lgn in enumerate(lgnames):
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pgtp = MetisPGTP(drop_list)
         pgtp.json
示例#5
0
 def test_pso_scheduler(self):
     lgs = {'cont_img.json': 540, 'cont_img.json': 450, 'test_grpby_gather.json': 70, 'chiles_simple.json': 160}
     mdp = 2
     for lgn, deadline in lgs.items():
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         psps01 = PSOScheduler(drop_list, max_dop=mdp)
         psps01.partition_dag()
         psps02 = PSOScheduler(drop_list, max_dop=mdp, deadline=deadline)
         psps02.partition_dag()
示例#6
0
 def test_sa_scheduler(self):
     lgs = {'lofar_std.json': 450}
     mdp = 4
     for lgn, deadline in lgs.items():
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pssa01 = SAScheduler(drop_list, max_dop=mdp)
         pssa01.partition_dag()
         pssa02 = SAScheduler(drop_list, max_dop=mdp, deadline=deadline)
         pssa02.partition_dag()
示例#7
0
 def test_mysarkar_scheduler(self):
     lgs = {'cont_img.json': 20, 'cont_img.json': 15, 'test_grpby_gather.json': 10, 'chiles_simple.json': 5}
     mdp = 8
     for lgn, numparts in lgs.items():
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         mys = MySarkarScheduler(drop_list, max_dop=mdp)
         _, _, _, parts = mys.partition_dag()
         for part in parts:
             pass
             """
示例#8
0
 def test_mysarkar_pgtp(self):
     lgnames = [
         'testLoop.graph', 'cont_img.json', 'test_grpby_gather.json',
         'chiles_simple.json'
     ]
     tgt_partnum = [15, 15, 10, 10, 5]
     for i, lgn in enumerate(lgnames):
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pgtp = MySarkarPGTP(drop_list)
         pgtp.json
示例#9
0
 def test_minnumparts_pgtp(self):
     lgnames = [
         'lofar_std.json', 'test_grpby_gather.json', 'chiles_simple.json'
     ]
     #tgt_partnum = [15, 15, 10, 10, 5]
     tgt_deadline = [200, 300, 90, 80, 160]
     for i, lgn in enumerate(lgnames):
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pgtp = MinNumPartsPGTP(drop_list, tgt_deadline[i])
         pgtp.json
示例#10
0
 def test_metis_pgtp_gen_pg(self):
     lgnames = [
         'lofar_std.json', 'test_grpby_gather.json', 'chiles_simple.json'
     ]
     tgt_partnum = [15, 15, 10, 10, 5]
     node_list = ['10.128.0.11', '10.128.0.12', '10.128.0.13']
     for i, lgn in enumerate(lgnames):
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pgtp = MetisPGTP(drop_list, 3, merge_parts=True)
         #pgtp.json
         pgtp.to_gojs_json(visual=False)
         pg_spec = pgtp.to_pg_spec(node_list)
示例#11
0
 def test_metis_pgtp_gen_pg_island(self):
     lgnames = [
         'lofar_std.json', 'test_grpby_gather.json', 'chiles_simple.json'
     ]
     tgt_partnum = [15, 15, 10, 10, 5]
     node_list = [
         '10.128.0.11', '10.128.0.12', '10.128.0.13', '10.128.0.14',
         '10.128.0.15', '10.128.0.16'
     ]
     nb_islands = 2
     nb_nodes = len(node_list) - nb_islands
     for i, lgn in enumerate(lgnames):
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pgtp = MetisPGTP(drop_list, nb_nodes, merge_parts=True)
         pgtp.to_gojs_json(visual=False)
         pg_spec = pgtp.to_pg_spec(node_list, num_islands=nb_islands)
         pgtp.result(lazy=False)
示例#12
0
 def test_mysarkar_pgtp_gen_pg_island(self):
     lgnames = [
         'lofar_std.json', 'test_grpby_gather.json', 'chiles_simple.json'
     ]
     node_list = [
         '10.128.0.11', '10.128.0.12', '10.128.0.13', '10.128.0.14',
         '10.128.0.15', '10.128.0.16'
     ]
     for i, lgn in enumerate(lgnames):
         fp = get_lg_fname(lgn)
         lg = LG(fp)
         drop_list = lg.unroll_to_tpl()
         pgtp = MySarkarPGTP(drop_list, None, merge_parts=True)
         pgtp.to_gojs_json(visual=False)
         nb_islands = 2
         #print(lgn)
         try:
             pgtp.merge_partitions(len(node_list) - nb_islands,
                                   form_island=False)
         except GPGTNoNeedMergeException as ge:
             continue
         pg_spec = pgtp.to_pg_spec(node_list, num_islands=nb_islands)
         pgtp.result()
示例#13
0
 def test_basic_scheduler(self):
     fp = get_lg_fname('cont_img.json')
     lg = LG(fp)
     drop_list = lg.unroll_to_tpl()
     Scheduler(drop_list)
示例#14
0
 def test_pgt_to_json(self):
     fp = get_lg_fname('cont_img.json')
     lg = LG(fp)
     drop_list = lg.unroll_to_tpl()
     pgt = PGT(drop_list)
示例#15
0
 def test_pg_test(self):
     fp = get_lg_fname('test_grpby_gather.json')
     lg = LG(fp)
     lg.unroll_to_tpl()
示例#16
0
 def test_pg_generator(self):
     fp = get_lg_fname('cont_img.json')
     #        fp = get_lg_fname('testScatter.graph')
     lg = LG(fp)
     self.assertEqual(len(lg._done_dict.keys()), 46)
     drop_list = lg.unroll_to_tpl()
示例#17
0
 def test_pg_generator(self):
     fp = get_lg_fname('lofar_std.json')
     #fp = '/Users/Chen/proj/dfms/dfms/lg/web/lofar_std.json'
     lg = LG(fp)
     self.assertEqual(len(lg._done_dict.keys()), 36)
     drop_list = lg.unroll_to_tpl()