diff --git a/executorlib/executor/base.py b/executorlib/executor/base.py index 5923fe63..4284a8d2 100644 --- a/executorlib/executor/base.py +++ b/executorlib/executor/base.py @@ -68,16 +68,16 @@ def submit( # type: ignore fn (callable): function to submit for execution args: arguments for the submitted function kwargs: keyword arguments for the submitted function - resource_dict (dict): resource dictionary, which defines the resources used for the execution of the - function. Example resource dictionary: { - cores: 1, - threads_per_core: 1, - gpus_per_worker: 0, - oversubscribe: False, - cwd: None, - executor: None, - hostname_localhost: False, - } + resource_dict (dict): A dictionary of resources required by the task. With the following keys: + - cores (int): number of MPI cores to be used for each function call + - threads_per_core (int): number of OpenMP threads to be used for each function call + - gpus_per_core (int): number of GPUs per worker - defaults to 0 + - cwd (str/None): current working directory where the parallel python task is executed + - openmpi_oversubscribe (bool): adds the `--oversubscribe` command line flag (OpenMPI and + SLURM only) - default False + - slurm_cmd_args (list): Additional command line arguments for the srun call (SLURM only) + - error_log_file (str): Name of the error log file to use for storing exceptions raised + by the Python functions submitted to the Executor. Returns: Future: A Future representing the given call. diff --git a/executorlib/standalone/interactive/spawner.py b/executorlib/standalone/interactive/spawner.py index 72f98cfb..85f92218 100644 --- a/executorlib/standalone/interactive/spawner.py +++ b/executorlib/standalone/interactive/spawner.py @@ -73,7 +73,7 @@ def __init__( cwd (str, optional): The current working directory. Defaults to None. cores (int, optional): The number of cores to use. Defaults to 1. threads_per_core (int, optional): The number of threads per core. Defaults to 1. - oversubscribe (bool, optional): Whether to oversubscribe the cores. Defaults to False. + openmpi_oversubscribe (bool, optional): Whether to oversubscribe the cores. Defaults to False. """ super().__init__( cwd=cwd, diff --git a/executorlib/standalone/serialize.py b/executorlib/standalone/serialize.py index 2eacfab7..75b5c4e5 100644 --- a/executorlib/standalone/serialize.py +++ b/executorlib/standalone/serialize.py @@ -42,16 +42,16 @@ def serialize_funct_h5( fn (Callable): The function to be serialized. fn_args (list): The arguments of the function. fn_kwargs (dict): The keyword arguments of the function. - resource_dict (dict): resource dictionary, which defines the resources used for the execution of the function. - Example resource dictionary: { - cores: 1, - threads_per_core: 1, - gpus_per_worker: 0, - oversubscribe: False, - cwd: None, - executor: None, - hostname_localhost: False, - } + resource_dict (dict): A dictionary of resources required by the task. With the following keys: + - cores (int): number of MPI cores to be used for each function call + - threads_per_core (int): number of OpenMP threads to be used for each function call + - gpus_per_core (int): number of GPUs per worker - defaults to 0 + - cwd (str/None): current working directory where the parallel python task is executed + - openmpi_oversubscribe (bool): adds the `--oversubscribe` command line flag (OpenMPI and + SLURM only) - default False + - slurm_cmd_args (list): Additional command line arguments for the srun call (SLURM only) + - error_log_file (str): Name of the error log file to use for storing exceptions raised + by the Python functions submitted to the Executor. cache_key (str, optional): By default the cache_key is generated based on the function hash, this can be overwritten by setting the cache_key. diff --git a/executorlib/task_scheduler/base.py b/executorlib/task_scheduler/base.py index 36c46c21..d530e328 100644 --- a/executorlib/task_scheduler/base.py +++ b/executorlib/task_scheduler/base.py @@ -87,16 +87,16 @@ def submit( # type: ignore fn (callable): function to submit for execution args: arguments for the submitted function kwargs: keyword arguments for the submitted function - resource_dict (dict): resource dictionary, which defines the resources used for the execution of the - function. Example resource dictionary: { - cores: 1, - threads_per_core: 1, - gpus_per_worker: 0, - oversubscribe: False, - cwd: None, - executor: None, - hostname_localhost: False, - } + resource_dict (dict): A dictionary of resources required by the task. With the following keys: + - cores (int): number of MPI cores to be used for each function call + - threads_per_core (int): number of OpenMP threads to be used for each function call + - gpus_per_core (int): number of GPUs per worker - defaults to 0 + - cwd (str/None): current working directory where the parallel python task is executed + - openmpi_oversubscribe (bool): adds the `--oversubscribe` command line flag (OpenMPI and + SLURM only) - default False + - slurm_cmd_args (list): Additional command line arguments for the srun call (SLURM only) + - error_log_file (str): Name of the error log file to use for storing exceptions raised + by the Python functions submitted to the Executor. Returns: Future: A Future representing the given call. diff --git a/executorlib/task_scheduler/interactive/blockallocation.py b/executorlib/task_scheduler/interactive/blockallocation.py index 7f474d6a..b417c655 100644 --- a/executorlib/task_scheduler/interactive/blockallocation.py +++ b/executorlib/task_scheduler/interactive/blockallocation.py @@ -113,16 +113,16 @@ def submit( # type: ignore fn (Callable): function to submit for execution args: arguments for the submitted function kwargs: keyword arguments for the submitted function - resource_dict (dict): resource dictionary, which defines the resources used for the execution of the - function. Example resource dictionary: { - cores: 1, - threads_per_core: 1, - gpus_per_worker: 0, - oversubscribe: False, - cwd: None, - executor: None, - hostname_localhost: False, - } + resource_dict (dict): A dictionary of resources required by the task. With the following keys: + - cores (int): number of MPI cores to be used for each function call + - threads_per_core (int): number of OpenMP threads to be used for each function call + - gpus_per_core (int): number of GPUs per worker - defaults to 0 + - cwd (str/None): current working directory where the parallel python task is executed + - openmpi_oversubscribe (bool): adds the `--oversubscribe` command line flag (OpenMPI and + SLURM only) - default False + - slurm_cmd_args (list): Additional command line arguments for the srun call (SLURM only) + - error_log_file (str): Name of the error log file to use for storing exceptions raised + by the Python functions submitted to the Executor. Returns: Future: A Future representing the given call.