Skip to content

Commit de30887

Browse files
committed
Sch: Scheduling fixups
1 parent b16afad commit de30887

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sch/Sch.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ end
549549
task = nothing
550550
@label pop_task
551551
if task !== nothing
552+
@dagdebug task :schedule "Finished scheduling task"
552553
@maybelog ctx timespan_finish(ctx, :schedule, (;uid=state.uid, thunk_id=task.id), (;thunk_id=task.id))
553554
end
554555
if isempty(state.ready)
@@ -564,6 +565,7 @@ end
564565
finish_failed!(state, task)
565566
else
566567
# This shouldn't have happened
568+
@dagdebug task :schedule "Scheduling inconsistency: Task being scheduled is already cached!"
567569
iob = IOBuffer()
568570
println(iob, "Scheduling inconsistency: Task being scheduled is already cached!")
569571
println(iob, " Task: $(task.id)")
@@ -591,7 +593,7 @@ end
591593
if scope isa InvalidScope
592594
ex = SchedulingException("compute_scope and result_scope are not compatible: $(scope.x), $(scope.y)")
593595
store_result!(state, task, ex; error=true)
594-
set_failed!(state, task)
596+
finish_failed!(state, task)
595597
@goto pop_task
596598
end
597599
for arg in task.inputs
@@ -608,7 +610,7 @@ end
608610
if scope isa InvalidScope
609611
ex = SchedulingException("Current scope and argument Chunk scope are not compatible: $(scope.x), $(scope.y)")
610612
store_result!(state, task, ex; error=true)
611-
set_failed!(state, task)
613+
finish_failed!(state, task)
612614
@goto pop_task
613615
end
614616
end
@@ -669,7 +671,7 @@ end
669671

670672
ex = SchedulingException("No processors available, try widening scope")
671673
store_result!(state, task, ex; error=true)
672-
set_failed!(state, task)
674+
finish_failed!(state, task)
673675
@dagdebug task :schedule "No processors available, skipping"
674676
sorted_procs_cleanup()
675677
costs_cleanup()

0 commit comments

Comments
 (0)