11submodule(image_m) image_s
2- use dag_interface , only: dag_t
2+ use dag_m , only: dag_t
33 use iso_fortran_env, only: event_type
44 use final_task_m, only: final_task_t
55 use mailbox_m, only: mailbox, mailbox_entry_can_be_freed
@@ -84,7 +84,7 @@ function do_work(tasks, dag) result(tasks_left)
8484 integer , allocatable :: upstream_task_imagenums(:)
8585
8686 ! figure out which images have our input data
87- upstream_task_nums = dag% get_edges (task_identifier)
87+ upstream_task_nums = dag% dependencies_for (task_identifier)
8888 upstream_task_imagenums = task_assignment_history(upstream_task_nums)[scheduler_image]
8989
9090 ! execute task, store result
@@ -138,10 +138,10 @@ function assign_task(dag) result(tasks_left)
138138 ! check which task the image just finished, that's task A
139139 ! for each task B upstream of A, walk through that task's downstream dependencies
140140 ! if they're all completed, the output data from B can be freed.
141- upstream_tasks = dag% get_edges (task_identifier[next_image])
141+ upstream_tasks = dag% dependencies_for (task_identifier[next_image])
142142 upstream_task_images = task_assignment_history(upstream_tasks)
143143 do i = 1 , size (upstream_tasks)
144- if (all (task_done(dag% get_dependencies (upstream_tasks(i))))) then
144+ if (all (task_done(dag% depends_on (upstream_tasks(i))))) then
145145 mailbox_entry_can_be_freed(upstream_tasks(i))[upstream_task_images(i)] = .true.
146146 end if
147147 end do
@@ -176,7 +176,8 @@ subroutine assign_completed_to_images()
176176 end subroutine
177177
178178 pure function find_next_task ( dag ) Result ( next_task_to_run )
179- ! ! find_next_task: search through the dag to find the next task where its dependents are complete
179+ ! ! find_next_task: search through the dag to find the next task where its
180+ ! ! dependencies are complete
180181! !
181182! ! possible outputs for next_task_to_run
182183! ! - a positive integer signals the next task to run
@@ -189,7 +190,7 @@ pure function find_next_task ( dag ) Result ( next_task_to_run )
189190 integer :: next_task_to_run
190191
191192 integer :: task, depends
192- integer , allocatable , dimension (:) :: dependents
193+ integer , allocatable , dimension (:) :: dependencies
193194 logical :: done, all_done
194195
195196 all_done = .true.
@@ -200,10 +201,10 @@ pure function find_next_task ( dag ) Result ( next_task_to_run )
200201 cycle
201202 else
202203 all_done = .false.
203- dependents = dag% get_dependencies ( task )
204+ dependencies = dag% dependencies_for ( task )
204205 done = .true.
205- do depends = 1 , size (dependents )
206- done = done .and. task_done(depends)
206+ do depends = 1 , size (dependencies )
207+ done = done .and. task_done(dependencies( depends) )
207208 end do
208209 if ( done ) then
209210 next_task_to_run = task
0 commit comments