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 committed Nov 1, 2024
1 parent 044db5a commit b0f098c
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 @@ -277,6 +277,7 @@ async def execute(
forward_model_ok_lock = asyncio.Lock()
verify_checksum_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(
Expand Down

0 comments on commit b0f098c

Please sign in to comment.