File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,16 @@ function assign_task(dag) result(tasks_left)
141141 ! check which task the image just finished, that's task A
142142 ! for each task B upstream of A, walk through that task's downstream dependencies
143143 ! if they're all completed, the output data from B can be freed.
144- ! upstream_tasks = dag%dependencies_for(task_identifier[next_image])
145- ! upstream_task_images = task_assignment_history(upstream_tasks)
146- ! do i = 1, size(upstream_tasks)
147- ! if (all(task_done(dag%depends_on(upstream_tasks(i))))) then
148- ! mailbox_entry_can_be_freed(upstream_tasks(i))[upstream_task_images(i)] = .true.
149- ! end if
150- ! end do
144+ i = task_identifier[next_image]
145+ if (i /= NO_TASK_READY) then
146+ upstream_tasks = dag% dependencies_for(i)
147+ upstream_task_images = task_assignment_history(upstream_tasks)
148+ do i = 1 , size (upstream_tasks)
149+ if (all (task_done(dag% depends_on(upstream_tasks(i))))) then
150+ mailbox_entry_can_be_freed(upstream_tasks(i))[upstream_task_images(i)] = .true.
151+ end if
152+ end do
153+ end if
151154
152155
153156 ! tell the image that it can proceed with the next task
You can’t perform that action at this time.
0 commit comments