Skip to content

Commit

Permalink
fix unstable dependency resolver ordering
Browse files Browse the repository at this point in the history
Fixes problems introduced by some doof in idaholab#12161.  This was causing one test
in rattlesnake to exodiff for distributed mesh runs on linux.
  • Loading branch information
rwcarlsen committed Oct 4, 2018
1 parent 74625ed commit 7cd58f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions framework/include/utils/DependencyResolver.h
Expand Up @@ -131,7 +131,7 @@ class DependencyResolver
std::set<std::pair<T, T>> _unique_deps;

/// Extra items that need to come out in the sorted list but contain no dependencies
std::set<T> _independent_items;
std::vector<T> _independent_items;

// A vector retaining the order in which items were added to the
// resolver, to disambiguate ordering of items with no
Expand Down Expand Up @@ -228,7 +228,8 @@ template <typename T>
void
DependencyResolver<T>::addItem(const T & value)
{
_independent_items.insert(value);
if (std::find(_independent_items.begin(), _independent_items.end(), value) == _independent_items.end())
_independent_items.push_back(value);
if (std::find(_ordering_vector.begin(), _ordering_vector.end(), value) == _ordering_vector.end())
_ordering_vector.push_back(value);
}
Expand Down

0 comments on commit 7cd58f9

Please sign in to comment.