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)
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)