Skip to content

Commit

Permalink
Merge pull request #58 from sourceryinstitute/rm-erroneous-concurrency
Browse files Browse the repository at this point in the history
fix(topological_sort): remove nonconforming `concurrent`
  • Loading branch information
rouson authored Sep 24, 2021
2 parents 923348e + a7a262e commit d83d0a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dag_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pure module function topological_sort(dag) result(order)

searched_and_ordered = searched_and_ordered_t(s = [integer::], o = [integer::])

do concurrent(v = 1:size(dag%vertices))
do v = 1, size(dag%vertices)
if (.not. any(v == searched_and_ordered%s)) &
searched_and_ordered = depth_first_search(v, [integer::], searched_and_ordered%o)
end do
Expand All @@ -60,7 +60,7 @@ pure recursive function depth_first_search(v, d, o) result(hybrid)
associate(dependencies => dag%depends_on(v))
block
integer w
do concurrent(w = 1:size(dependencies))
do w = 1, size(dependencies)
associate(w_dependencies => dependencies(w))
if (.not. any(w_dependencies == hybrid%s)) hybrid = depth_first_search(w_dependencies, [d, v], hybrid%o)
end associate
Expand Down

0 comments on commit d83d0a4

Please sign in to comment.