Skip to content
Merged
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
14 changes: 6 additions & 8 deletions pympipool/shared/executorbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,16 @@ def execute_task_dict(task_dict, meta_future_lst):
raise ValueError("Unrecognized Task in task_dict: ", task_dict)


def _get_command_path(executable):
return os.path.abspath(os.path.join(__file__, "..", "..", "backend", executable))


def get_backend_path(cores):
command_lst = [sys.executable]
if cores > 1:
command_lst += [
os.path.abspath(
os.path.join(__file__, "..", "..", "backend", "mpiexec.py")
),
]
command_lst += [_get_command_path(executable="mpiexec.py")]
else:
command_lst += [
os.path.abspath(os.path.join(__file__, "..", "..", "backend", "serial.py")),
]
command_lst += [_get_command_path(executable="serial.py")]
return command_lst


Expand Down