Skip to content

Commit e510748

Browse files
committed
Sch: Debug processor rejection
1 parent 22c736f commit e510748

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/sch/util.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,17 @@ function can_use_proc(task, gproc, proc, opts, scope)
250250
# Check against proclist
251251
if opts.proclist === nothing
252252
if !default_enabled(proc)
253+
@debug "Rejected $proc: !default_enabled(proc)"
253254
return false
254255
end
255256
elseif opts.proclist isa Function
256257
if !Base.invokelatest(opts.proclist, proc)
258+
@debug "Rejected $proc: proclist(proc) == false"
257259
return false
258260
end
259261
elseif opts.proclist isa Vector
260262
if !(typeof(proc) in opts.proclist)
263+
@debug "Rejected $proc: !(typeof(proc) in proclist)"
261264
return false
262265
end
263266
else
@@ -267,12 +270,15 @@ function can_use_proc(task, gproc, proc, opts, scope)
267270
# Check against single
268271
if opts.single != 0
269272
if gproc.pid != opts.single
273+
@debug "Rejected $proc: gproc.pid != single"
270274
return false
271275
end
272276
end
273277

274278
# Check scope
275-
if constrain(scope, Dagger.ExactScope(proc)) isa Dagger.InvalidScope
279+
proc_scope = Dagger.ExactScope(proc)
280+
if constrain(scope, proc_scope) isa Dagger.InvalidScope
281+
@debug "Rejected $proc: Task scope ($scope) vs. processor scope ($proc_scope)"
276282
return false
277283
end
278284

0 commit comments

Comments
 (0)