Skip to content

Commit

Permalink
Make scheduler execute yield during spawning of realizations
Browse files Browse the repository at this point in the history
Starting the realizations in scheduler was blocking all other async tasks
from running. Nothing could connect to ensemble evaluator during this.
Under heavy load this could cause Monitor to time out and fail. Now we will
sleep(0) between each time we create a new subprocess. This will allow
other asyncio tasks to run.
  • Loading branch information
JHolba authored and sondreso committed Nov 1, 2024
1 parent 2a5e828 commit 2c78ee9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ert/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ async def execute(
# does internalization at a time
forward_model_ok_lock = asyncio.Lock()
for iens, job in self._jobs.items():
await asyncio.sleep(0)
if job.state != JobState.ABORTED:
self._job_tasks[iens] = asyncio.create_task(
job.run(sem, forward_model_ok_lock, self._max_submit),
Expand Down

0 comments on commit 2c78ee9

Please sign in to comment.