diff --git a/pympipool/backend/mpiexec.py b/pympipool/backend/mpiexec_interactive.py similarity index 100% rename from pympipool/backend/mpiexec.py rename to pympipool/backend/mpiexec_interactive.py diff --git a/pympipool/backend/serial.py b/pympipool/backend/serial_interactive.py similarity index 100% rename from pympipool/backend/serial.py rename to pympipool/backend/serial_interactive.py diff --git a/pympipool/shared/executorbase.py b/pympipool/shared/executorbase.py index f45dea88..33be5f0d 100644 --- a/pympipool/shared/executorbase.py +++ b/pympipool/shared/executorbase.py @@ -417,20 +417,20 @@ def _get_backend_path(cores: int): Get command to call backend as a list of two strings Args: - cores (int): Number of cores used to execute the task, if it is greater than one use mpiexec.py else serial.py + cores (int): Number of cores used to execute the task, if it is greater than one use mpiexec_interactive.py else serial_interactive.py Returns: list[str]: List of strings containing the python executable path and the backend script to execute """ command_lst = [sys.executable] if cores > 1 and importlib.util.find_spec("mpi4py") is not None: - command_lst += [_get_command_path(executable="mpiexec.py")] + command_lst += [_get_command_path(executable="mpiexec_interactive.py")] elif cores > 1: raise ImportError( "mpi4py is required for parallel calculations. Please install mpi4py." ) else: - command_lst += [_get_command_path(executable="serial.py")] + command_lst += [_get_command_path(executable="serial_interactive.py")] return command_lst @@ -439,7 +439,7 @@ def _get_command_path(executable: str): Get path of the backend executable script Args: - executable (str): Name of the backend executable script, either mpiexec.py or serial.py + executable (str): Name of the backend executable script, either mpiexec_interactive.py or serial_interactive.py Returns: str: absolute path to the executable script diff --git a/tests/test_backend_serial.py b/tests/test_backend_serial.py index 07a70861..3684ed7f 100644 --- a/tests/test_backend_serial.py +++ b/tests/test_backend_serial.py @@ -4,7 +4,7 @@ import cloudpickle import zmq -from pympipool.backend.serial import main +from pympipool.backend.serial_interactive import main def calc(i, j): diff --git a/tests/test_shared_communication.py b/tests/test_shared_communication.py index a096c781..0cc74079 100644 --- a/tests/test_shared_communication.py +++ b/tests/test_shared_communication.py @@ -39,7 +39,7 @@ def test_interface_mpi(self): sys.executable, os.path.abspath( os.path.join( - __file__, "..", "..", "pympipool", "backend", "mpiexec.py" + __file__, "..", "..", "pympipool", "backend", "mpiexec_interactive.py" ) ), "--zmqport", @@ -62,7 +62,7 @@ def test_interface_serial(self): sys.executable, os.path.abspath( os.path.join( - __file__, "..", "..", "pympipool", "backend", "serial.py" + __file__, "..", "..", "pympipool", "backend", "serial_interactive.py" ) ), "--zmqport",