Skip to content

Commit

Permalink
Fixes for pympipool 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Sep 17, 2023
1 parent 4ee7b21 commit a844f6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions pysqa/executor/backend.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys

from pympipool import PoolExecutor
from pympipool.mpi import PyMPIExecutor
from pysqa.executor.helper import (
read_from_file,
deserialize,
Expand Down Expand Up @@ -39,15 +39,16 @@ def execute_files_from_list(tasks_in_progress_dict, cache_directory, executor):

def execute_tasks(cores, cache_directory):
tasks_in_progress_dict = {}
with PoolExecutor(
with PyMPIExecutor(
max_workers=cores,
cores_per_worker=1,
threads_per_core=1,
gpus_per_worker=0,
oversubscribe=False,
enable_flux_backend=False,
enable_slurm_backend=False,
init_function=None,
cwd=cache_directory,
sleep_interval=0.1,
queue_adapter=None,
queue_adapter_kwargs=None,
enable_slurm_backend=False,
) as exe:
while True:
execute_files_from_list(
Expand Down
2 changes: 1 addition & 1 deletion pysqa/executor/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import queue
from concurrent.futures import Future, Executor as FutureExecutor

from pympipool import cancel_items_in_queue, RaisingThread
from pympipool.shared import cancel_items_in_queue, RaisingThread
from pysqa.executor.helper import (
reload_previous_futures,
find_executed_tasks,
Expand Down

0 comments on commit a844f6b

Please sign in to comment.