Skip to content

Commit 981b77e

Browse files
committed
SlurmClusterExecutor - create a separate working directory for each job
Even when the user does not define a specific working directory, otherwise the submission script and the error log gets overwritten.
1 parent 5f87bb4 commit 981b77e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

executorlib/task_scheduler/file/queue_spawner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def execute_with_pysqa(
5050
if "cwd" in resource_dict and resource_dict["cwd"] is not None:
5151
cwd = resource_dict["cwd"]
5252
else:
53-
cwd = cache_directory
53+
folder = command[-1].split("_i.h5")[0]
54+
cwd = os.path.join(cache_directory, folder)
55+
os.makedirs(cwd, exist_ok=True)
5456
submit_kwargs = {
5557
"command": " ".join(command),
5658
"dependency_list": [str(qid) for qid in task_dependent_lst],

0 commit comments

Comments
 (0)