Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion task-runner/task_runner/executers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from .exec_command_logger import ExecCommandLogger # noqa: I001
from .base_executer import BaseExecuter, ExecuterSubProcessError # noqa: I001
from .command import Command # noqa: I001
from .mpi_base_executer import MPIExecuter # noqa: I001
from .mpi_configuration import MPIClusterConfiguration # noqa: I001
from .subprocess_tracker import SubprocessTracker # noqa: I001
from . import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import getpass
import os
import shutil

from task_runner import executers
from task_runner.utils import files
Expand All @@ -18,18 +17,13 @@ def execute(self):
else:
global_env = {}

input_dir = os.path.join(self.working_dir, self.args.sim_dir)

run_subprocess_dir = self.artifacts_dir_container

if hasattr(self.args,
'run_subprocess_dir') and self.args.run_subprocess_dir:
run_subprocess_dir = os.path.join(self.artifacts_dir_container,
self.args.run_subprocess_dir)

# Copy the input files to the artifacts directory
shutil.copytree(input_dir, self.artifacts_dir, dirs_exist_ok=True)

original_username = None
if self.commands_user:
original_username = getpass.getuser()
Expand Down
9 changes: 8 additions & 1 deletion task-runner/task_runner/executers/base_executer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
its usage.
"""
import os
import shutil
import threading
import time
from abc import ABC, abstractmethod
Expand Down Expand Up @@ -92,7 +93,13 @@ def __init__(

logging.info("Working directory: %s", self.working_dir)

os.makedirs(self.artifacts_dir)
# Move the inputs from sim_dir/ to artifacts_dir/ so that artifacts_dir/
# already contains the inputs, avoiding the need for copying
shutil.move(
src=f"{self.working_dir}/{self.args.sim_dir}",
dst=self.artifacts_dir,
)

logging.info("Created output directory: %s", self.output_dir)
logging.info("Created artifacts directory: %s", self.artifacts_dir)

Expand Down
66 changes: 0 additions & 66 deletions task-runner/task_runner/executers/mpi_base_executer.py

This file was deleted.