diff --git a/pympipool/parallel_executors/mpiexec.py b/pympipool/parallel_executors/mpiexec.py index 9f7490ee..412bf9c0 100644 --- a/pympipool/parallel_executors/mpiexec.py +++ b/pympipool/parallel_executors/mpiexec.py @@ -35,6 +35,7 @@ def main(): memory = None + # required for flux interface - otherwise the current path is not included in the python path cwd = abspath(".") if cwd not in sys.path: sys.path.insert(1, cwd) diff --git a/pympipool/parallel_executors/mpipool.py b/pympipool/parallel_executors/mpipool.py index 27215dee..11116c86 100644 --- a/pympipool/parallel_executors/mpipool.py +++ b/pympipool/parallel_executors/mpipool.py @@ -29,11 +29,15 @@ def main(): future_dict = {} argument_dict = parse_arguments(argument_lst=sys.argv) + # required for flux interface - otherwise the current path is not included in the python path cwd = abspath(".") if cwd not in sys.path: sys.path.insert(1, cwd) - with MPIPoolExecutor(int(argument_dict["total_cores"])) as executor: + with MPIPoolExecutor( + max_workers=int(argument_dict["total_cores"]), + path=sys.path, # required for flux interface - otherwise the current path is not included in the python path + ) as executor: if executor is not None: context, socket = connect_to_socket_interface( host=argument_dict["host"], port=argument_dict["zmqport"]