Skip to content

Commit 7aa0dc5

Browse files
committed
Datadeps: Throw SchedulingException on bad scope
1 parent 586040a commit 7aa0dc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/datadeps.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ function distribute_tasks!(queue::DataDepsTaskQueue)
450450
filter!(proc->!isa(constrain(ExactScope(proc), scope),
451451
InvalidScope),
452452
all_procs)
453+
if isempty(all_procs)
454+
throw(Sch.SchedulingException("No processors available, try widening scope"))
455+
end
453456
exec_spaces = unique(vcat(map(proc->collect(memory_spaces(proc)), all_procs)...))
454457
if !all(space->space isa CPURAMMemorySpace, exec_spaces) && !all(space->root_worker_id(space) == myid(), exec_spaces)
455458
@warn "Datadeps support for multi-GPU, multi-worker is currently broken\nPlease be prepared for incorrect results or errors" maxlog=1

0 commit comments

Comments
 (0)