Skip to content

Commit

Permalink
make sure non-dask mode works, and increase chunk size dramatically t…
Browse files Browse the repository at this point in the history
…o decrease graph size
  • Loading branch information
keflavich committed Oct 11, 2024
1 parent 23b9485 commit f7900aa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions aces/analysis/giantcube_cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ def do_all_stats(cube, molname, mompath=f'{basepath}/mosaics/cubes/moments/',
dopv=True, dods=True, howargs={}):
t0 = time.time()
print(cube, flush=True)
print("Dask graph:\n", cube._data.max().__dask_graph__(), flush=True)
if hasattr(cube, 'rechunk'):
print("Dask graph:\n", cube._data.max().__dask_graph__(), flush=True)

cube = cube.rechunk((-1, 200, 200))
cube = cube.rechunk((-1, 1000, 1000))

print("Rechunked")
print(cube, flush=True)
print("Dask graph:\n", cube._data.max().__dask_graph__(), flush=True)
print("Rechunked")
print(cube, flush=True)
print("Dask graph:\n", cube._data.max().__dask_graph__(), flush=True)

print(f"mom0. dt={time.time() - t0}", flush=True)
mom0 = cube.moment0(axis=0, **howargs)
Expand Down

0 comments on commit f7900aa

Please sign in to comment.