Skip to content

Commit

Permalink
#2174: small bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Jul 23, 2024
1 parent 36613a4 commit d53f645
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions cmake/load_bundled_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ endif()

# yaml-cpp always included in the build
set(YAMLCPP_LIBRARY yaml-cpp)
add_subdirectory(${PROJECT_LIB_DIR}/yaml-cpp)
set_darma_compiler_flags(${YAMLCPP_LIBRARY})
if(NOT TARGET ${YAMLCPP_LIBRARY})
add_subdirectory(${PROJECT_LIB_DIR}/yaml-cpp)
set_darma_compiler_flags(${YAMLCPP_LIBRARY})
endif()

# EngFormat-Cpp always included in the build
set(ENG_FORMAT_LIBRARY EngFormat-Cpp)
Expand Down
9 changes: 4 additions & 5 deletions src/vt/vrt/collection/balance/lb_data_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,12 @@ std::unique_ptr<vt::tv::PhaseWork> LBDataHolder::toTV(PhaseType phase) const {
std::unordered_map<ElementIDType, ObjectWork> objects;

if (node_data_.find(phase) != node_data_.end()) {
std::cout << "FINDING PHASE " << phase << std::endl;
for (auto&& elm : node_data_.at(phase)) {
ElementIDStruct id = elm.first;
double whole_phase_load = elm.second.whole_phase_load;
auto const& subphase_loads = elm.second.subphase_loads;

typename DataMapType::mapped_type user_defined;
ElmUserDataType user_defined;
if (
user_defined_lb_info_.find(phase) != user_defined_lb_info_.end() and
user_defined_lb_info_.at(phase).find(id) !=
Expand All @@ -309,9 +308,9 @@ std::unique_ptr<vt::tv::PhaseWork> LBDataHolder::toTV(PhaseType phase) const {
objects.try_emplace(
id.id,
// add id into map and then construct ObjectWork with these parameters
ObjectWork{
id.id, whole_phase_load, std::move(subphase_map) //, std::move(user_defined)
}
ObjectWork(
id.id, whole_phase_load, std::move(subphase_map), std::move(user_defined)
)
);
}
}
Expand Down

0 comments on commit d53f645

Please sign in to comment.