Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/Drivers/hiopbbpy/EvaluationManagerCI.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,13 @@ def _fn_for_test(x, sleep_time=0.1, slow_first=False, driver_rank=0):
)
args = parser.parse_args()

# Choose executor type
if is_running_with_mpi():
from mpi4py import MPI
driver_rank = MPI.COMM_WORLD.Get_rank()
executor_type = "mpi"
else:
driver_rank = 0
executor_type = "cpu"

# Set up logging
logging.basicConfig(level=logging.INFO)

# Create manager
cpu_executor = ThreadPoolExecutor()
manager = EvaluationManager(
cpu_executor=cpu_executor,
executor=cpu_executor,
profiling=args.profile,
task_name="CI_TASK"
)
Expand All @@ -81,10 +72,8 @@ def _fn_for_test(x, sleep_time=0.1, slow_first=False, driver_rank=0):
manager.submit_tasks(
_fn_for_test,
[i for i in range(args.n)],
execute_at=executor_type,
sleep_time=args.sleep_time,
slow_first=args.slow_first,
driver_rank=driver_rank,
)

# Do some other work while tasks are running
Expand Down
Loading
Loading