1.1 --- a/examples/simple_managed.py Sat Sep 15 19:41:49 2007 +0000
1.2 +++ b/examples/simple_managed.py Sat Sep 15 19:42:24 2007 +0000
1.3 @@ -36,16 +36,17 @@
1.4
1.5 if __name__ == "__main__":
1.6
1.7 + t = time.time()
1.8 +
1.9 # Initialise the communications exchange with a limit on the number of
1.10 # channels/processes.
1.11
1.12 exchange = MyExchange(limit=limit)
1.13 - t = time.time()
1.14
1.15 # Initialise an array - it is stored in the exchange to permit automatic
1.16 # assignment of values as the data arrives.
1.17
1.18 - exchange.D = [0] * N * N
1.19 + results = exchange.D = [0] * N * N
1.20
1.21 # Wrap the calculate function and manage it.
1.22
1.23 @@ -65,10 +66,11 @@
1.24
1.25 # Show the results.
1.26
1.27 - print "Time taken:", time.time() - t
1.28 for i in range(0, N):
1.29 - for result in exchange.D[i*N:i*N+N]:
1.30 + for result in results[i*N:i*N+N]:
1.31 print result,
1.32 print
1.33
1.34 + print "Time taken:", time.time() - t
1.35 +
1.36 # vim: tabstop=4 expandtab shiftwidth=4