Skip to content

Commit db94dba

Browse files
committed
Set reslice dir default value to output dir
Prior to this change, the default value for the `--reslice-dir` flag of `None` was transformed into a temp dir. However, there have been observations of: - insufficient storage space - sometimes very slow write speeds when on the cusp of filling up the storage space in `/tmp` of DLS cluster nodes. This, together with noting that the output directory is very often at DLS a dir within a GPFS mount and that write speeds are more consistent and faster this way, motivated the decision to instead transform the default value of `None` for the `--reslice-dir` flag to the output dir that httomo creates.
1 parent 856733c commit db94dba

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

httomo/cli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from contextlib import AbstractContextManager, nullcontext
22
from datetime import datetime
3+
from os import PathLike
34
from pathlib import Path, PurePath
45
import sys
56
import tempfile
@@ -278,7 +279,7 @@ def run(
278279
max_memory,
279280
monitor,
280281
monitor_output,
281-
reslice_dir,
282+
reslice_dir if reslice_dir is not None else httomo.globals.run_out_dir,
282283
save_snapshots,
283284
)
284285
else:
@@ -415,7 +416,7 @@ def execute_high_throughput_run(
415416
max_memory: str,
416417
monitor: List[str],
417418
monitor_output: TextIO,
418-
reslice_dir: Union[Path, None],
419+
reslice_dir: PathLike,
419420
save_snapshots: bool,
420421
) -> None:
421422
# we use half the memory for blocks since we typically have inputs/output
@@ -426,8 +427,6 @@ def execute_high_throughput_run(
426427
# Run the pipeline using Taskrunner, with temp dir or reslice dir
427428
mon = make_monitors(monitor, global_comm)
428429
ctx: AbstractContextManager = nullcontext(reslice_dir)
429-
if reslice_dir is None:
430-
ctx = tempfile.TemporaryDirectory()
431430
with ctx as tmp_dir:
432431
runner = TaskRunner(
433432
pipeline,

0 commit comments

Comments
 (0)