def master(): n = 1000 for i in range(0, n): mpi.submit_call("do_one", ()) s = 0 for i in range(0, n): s += mpi.get_next_result() print(s / n) mpi.info()
def master(): n = 1000 for i in range(0, n): mpi.submit_call("do_one", ()) s = 0 for i in range(0, n): s += mpi.get_next_result() print s / n mpi.info()
def master(): net = Network.BarabasiAlbert(n_nodes=1000, n_links_each=10) print net.newman_betweenness() mpi.info()