Skip to content

Commit

Permalink
Force /dev/shm
Browse files Browse the repository at this point in the history
  • Loading branch information
emfdavid committed Mar 1, 2024
1 parent dd75eb8 commit b2c1f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zarr/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ def parallel_io_method(instance, c_key, c_select, out_sel, my_out):
logger.exception("Error reading chunk %s", c_key)
my_out[out_sel] = instance._fill_value

with tempfile.NamedTemporaryFile(mode="w+b", prefix="zarr_memmap") as f:
with tempfile.NamedTemporaryFile(mode="w+b", prefix="zarr_memmap", dir="/dev/shm") as f:
logger.warning("Creating memmap array of shape %s - this could oom", out.shape)
output = np.memmap(f, dtype=out.dtype, shape=out.shape, mode='w+')

Expand Down

0 comments on commit b2c1f62

Please sign in to comment.