@@ -1552,39 +1552,42 @@ void TemperedLB::originalTransfer() {
1552
1552
}
1553
1553
}
1554
1554
1555
+ // void TemperedLB::tryLock(
1556
+ // NodeType requesting_node, double criterion_value, SharedIDType cluster_id
1557
+ // ) {
1558
+ // // some logic
1559
+
1560
+ // // if yes
1561
+ // is_locked = true;
1562
+ // proxy_[requesting_node].template send<ThisType::lockObtained>(/*full info on cluster*/);
1563
+ // }
1564
+
1565
+ // void TemperedLB::lockObtained() {
1566
+
1567
+ // }
1568
+
1555
1569
void TemperedLB::swapClusters () {
1556
1570
auto lazy_epoch = theTerm ()->makeEpochCollective (" TemperedLB: swapClusters" );
1557
1571
1558
1572
// Initialize transfer and rejection counters
1559
1573
int n_transfers = 0 , n_rejected = 0 ;
1560
1574
1561
1575
// Try to migrate objects only from overloaded ranks
1562
- if (is_overloaded_) {
1563
- // Compute collection of potential targets
1564
- std::vector<NodeType> under = makeUnderloaded ();
1565
- std::unordered_map<NodeType, ObjsType> migrate_objs;
1566
- if (under.size () > 0 ) {
1567
- std::vector<ObjIDType> ordered_obj_ids = orderObjects (
1568
- obj_ordering_, cur_objs_, this_new_load_, target_max_load_
1569
- );
1576
+ // Compute collection of potential targets
1577
+ // std::vector<NodeType> targets = other_rank_clusters_.keys();
1578
+ // sample cmf
1579
+ // Iterage over potential targets to try to swap clusters
1570
1580
1571
- // Cluster migratable objects on source rank
1581
+ // // Iteratr over target clusters
1572
1582
1573
- // Iterage over potential targets to try to swap clusters
1574
-
1575
- // // Iteratr over target clusters
1576
-
1577
- // //// Decide whether swap is beneficial
1583
+ // //// Decide whether swap is beneficial
1578
1584
1579
1585
1580
1586
// ////// If swap is beneficial compute source cluster size
1581
1587
// ////// Test whether criterion is creater than swap RTOL times source size
1582
1588
1583
- // //////// Only in this case perform swap
1584
- // //////// Else reject swap
1585
-
1586
- } // if (under.size() > 0)
1587
- } // if (is_overloaded_)
1589
+ // send try-lock message, with numerical criterion value
1590
+ // spin in the scheduler
1588
1591
1589
1592
// Finalize epoch
1590
1593
theTerm ()->finishedEpoch (lazy_epoch);
0 commit comments