def main(args): numChares = charm.numPes() * 10 a = Array(Test, numChares) g = Group(Test) charm.awaitCreation(a, g) f1 = Future() f2 = Future() a.start(f1) g.start(f2) f1.get() f2.get() exit()
def main(args): g = Group(Worker) random.seed(45782) ids = [] for i in range(MAX_VALS): #for _ in range(PHASE_NUM): #ids.append(i) ids.append(i) random.shuffle(ids) done = Future() g.start(done, awaitable=True).get() t0 = time.time() for id in ids: #g.recv_id(id) for _ in range(PHASE_NUM): g.recv_id(id) done.get() print("Elapsed=", time.time() - t0) exit()