Skip to content

Commit

Permalink
#2201: temperedlb: check if the obj is migratable during transfer stage
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed May 28, 2024
1 parent 4c28d1f commit 89b55f1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2088,31 +2088,33 @@ void TemperedLB::originalTransfer() {
vtAssert(load_iter != load_info_.end(), "Selected node not found");
auto& selected_load = load_iter->second.load;

// Evaluate criterion for proposed transfer
bool eval = Criterion(criterion_)(
// Check if object is migratable and evaluate criterion for proposed transfer
bool is_migratable = obj_id.isMigratable();
bool eval = obj_id.isMigratable() && Criterion(criterion_)(
this_new_load_, selected_load, obj_load, target_max_load_
);
vt_debug_print(
verbose, temperedlb,
"TemperedLB::originalTransfer: trial={}, iter={}, under.size()={}, "
"selected_node={}, selected_load={:e}, obj_id={:x}, home={}, "
"obj_load={}, target_max_load={}, this_new_load_={}, "
"criterion={}\n",
"is_migratable()={}, obj_load={}, target_max_load={}, "
"this_new_load_={}, criterion={}\n",
trial_,
iter_,
under.size(),
selected_node,
selected_load,
obj_id.id,
obj_id.getHomeNode(),
is_migratable,
LoadType(obj_load),
LoadType(target_max_load_),
LoadType(this_new_load_),
eval
);

// Decide about proposed migration based on criterion evaluation
if (eval) {
if (is_migratable and eval) {
++n_transfers;
// Transfer the object load in seconds
// to match the object load units on the receiving end
Expand Down

0 comments on commit 89b55f1

Please sign in to comment.