From c86e42201821dd88ba1b1f4d26425d8cffe59aae Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Fri, 11 Aug 2023 16:58:53 -0600 Subject: [PATCH 1/2] At least add the arguments for the executors --- pympipool/flux/fluxbroker.py | 11 +++++++++++ pympipool/mpi/mpibroker.py | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/pympipool/flux/fluxbroker.py b/pympipool/flux/fluxbroker.py index 0439549d..46e6fd76 100644 --- a/pympipool/flux/fluxbroker.py +++ b/pympipool/flux/fluxbroker.py @@ -8,6 +8,17 @@ class PyFluxExecutor(ExecutorBase): + """ + Args: + max_workers (int): defines the number workers which can execute functions in parallel + cores_per_worker (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_worker (int): number of GPUs per worker - defaults to 0 + init_function (None): optional function to preset arguments for functions which are submitted later + cwd (str/None): current working directory where the parallel python task is executed + sleep_interval (float): synchronization interval - default 0.1 + executor (flux.job.FluxExecutor): Flux Python interface to submit the workers to flux + """ def __init__( self, max_workers, diff --git a/pympipool/mpi/mpibroker.py b/pympipool/mpi/mpibroker.py index d879923c..4e22459f 100644 --- a/pympipool/mpi/mpibroker.py +++ b/pympipool/mpi/mpibroker.py @@ -8,6 +8,18 @@ class PyMPIExecutor(ExecutorBase): + """ + Args: + max_workers (int): defines the number workers which can execute functions in parallel + cores_per_worker (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_worker (int): number of GPUs per worker - defaults to 0 + oversubscribe (bool): adds the `--oversubscribe` command line flag (OpenMPI only) - default False + init_function (None): optional function to preset arguments for functions which are submitted later + cwd (str/None): current working directory where the parallel python task is executed + sleep_interval (float): synchronization interval - default 0.1 + enable_slurm_backend (bool): enable the SLURM queueing system as backend - defaults to False + """ def __init__( self, max_workers, From edede6927954af108be4ddab3bb459be64b2868c Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Fri, 11 Aug 2023 17:13:36 -0600 Subject: [PATCH 2/2] black formatting --- pympipool/flux/fluxbroker.py | 1 + pympipool/mpi/mpibroker.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pympipool/flux/fluxbroker.py b/pympipool/flux/fluxbroker.py index 46e6fd76..ac96332f 100644 --- a/pympipool/flux/fluxbroker.py +++ b/pympipool/flux/fluxbroker.py @@ -19,6 +19,7 @@ class PyFluxExecutor(ExecutorBase): sleep_interval (float): synchronization interval - default 0.1 executor (flux.job.FluxExecutor): Flux Python interface to submit the workers to flux """ + def __init__( self, max_workers, diff --git a/pympipool/mpi/mpibroker.py b/pympipool/mpi/mpibroker.py index 4e22459f..76c26797 100644 --- a/pympipool/mpi/mpibroker.py +++ b/pympipool/mpi/mpibroker.py @@ -20,6 +20,7 @@ class PyMPIExecutor(ExecutorBase): sleep_interval (float): synchronization interval - default 0.1 enable_slurm_backend (bool): enable the SLURM queueing system as backend - defaults to False """ + def __init__( self, max_workers,