Skip to content
Closed
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
8 changes: 7 additions & 1 deletion executorlib/shared/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,11 @@ def execute_parallel_tasks(
conda_environment_name (str): name of the conda environment to initialize
conda_environment_path (str): path of the conda environment to initialize
"""
conda = conda_environment_name is not None or conda_environment_path is not None
interface = interface_bootup(
command_lst=_get_backend_path(
cores=cores,
conda=conda,
),
connections=spawner(cores=cores, **kwargs),
hostname_localhost=hostname_localhost,
Expand Down Expand Up @@ -486,6 +488,7 @@ def get_command_path(executable: str) -> str:

def _get_backend_path(
cores: int,
conda: bool = False,
) -> list:
"""
Get command to call backend as a list of two strings
Expand All @@ -496,7 +499,10 @@ def _get_backend_path(
Returns:
list[str]: List of strings containing the python executable path and the backend script to execute
"""
command_lst = [sys.executable]
if not conda:
command_lst = [sys.executable]
else:
commands_lst = ["python"]
if cores > 1 and importlib.util.find_spec("mpi4py") is not None:
command_lst += [get_command_path(executable="interactive_parallel.py")]
elif cores > 1:
Expand Down