Commit 27a48915 authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

clean-up improvements

parent da38d093
......@@ -452,14 +452,22 @@ contains
subroutine aggregate_variable_list_finalize(self)
class (type_aggregate_variable_list), intent(inout) :: self
type (type_aggregate_variable), pointer :: current, next
type (type_aggregate_variable), pointer :: current, next
type (type_contributing_variable), pointer :: contributing_variable, contributing_variable2
current => self%first
do while (associated(current))
next => current%next
contributing_variable => current%first_contributing_variable
do while (associated(contributing_variable))
contributing_variable2 => contributing_variable%next
deallocate(contributing_variable)
contributing_variable => contributing_variable2
end do
deallocate(current)
current => next
end do
self%first => null()
end subroutine
function collect_aggregate_variables(self) result(list)
......
......@@ -1338,6 +1338,7 @@ contains
end do
node => node%next
end do
call global_call_list%finalize()
end subroutine check_graph_duplicates
subroutine job_manager_initialize(self, variable_register, schedules, unfulfilled_dependencies, log_unit)
......
......@@ -42,6 +42,7 @@ module fabm_task_order
procedure :: to_string => task_tree_node_to_string
procedure :: get_minimum_depth => task_tree_node_get_minimum_depth
procedure :: get_leaf_at_depth => task_tree_node_get_leaf_at_depth
procedure :: finalize => task_tree_node_finalize
end type
type, extends(type_graph_subset_node_set) :: type_step
......@@ -85,6 +86,7 @@ contains
steps(itask)%operation = leaf%operation
leaf => leaf%parent
end do
call root%finalize()
do itask = ntasks, 1, -1
call subset%collect(steps(itask)%operation, steps(itask))
end do
......@@ -300,6 +302,21 @@ contains
end do
end function
recursive subroutine task_tree_node_finalize(self)
class (type_task_tree_node), intent(inout) :: self
type (type_task_tree_node), pointer :: child, child2
child => self%first_child
do while (associated(child))
child2 => child%next_sibling
call child%finalize()
deallocate(child)
child => child2
end do
self%first_child => null()
end subroutine
recursive subroutine graph_subset_node_set_branch(self, parent)
class (type_graph_subset_node_set), intent(inout) :: self
type (type_task_tree_node),target, intent(inout) :: parent
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment