Skip to content

Commit 94c0d8e

Browse files
committed
fix
1 parent 14c9381 commit 94c0d8e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

executorlib/interactive/executor.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,19 @@ def create_executor(
226226
resource_dict["flux_executor_nesting"] = flux_executor_nesting
227227
if block_allocation:
228228
resource_dict["init_function"] = init_function
229+
max_workers = validate_number_of_cores(
230+
max_cores=max_cores,
231+
max_workers=max_workers,
232+
cores_per_worker=cores_per_worker,
233+
set_local_cores=False,
234+
)
229235
validate_max_workers(
230236
max_workers=max_workers,
231237
cores=cores_per_worker,
232238
threads_per_core=resource_dict["threads_per_core"],
233239
)
234240
return InteractiveExecutor(
235-
max_workers=validate_number_of_cores(
236-
max_cores=max_cores,
237-
max_workers=max_workers,
238-
cores_per_worker=cores_per_worker,
239-
set_local_cores=False,
240-
),
241+
max_workers=max_workers,
241242
executor_kwargs=resource_dict,
242243
spawner=FluxPythonSpawner,
243244
)

0 commit comments

Comments
 (0)