Skip to content

Commit

Permalink
#1359: LB: add nominal doc output for missing LBs
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander authored and nlslatt committed Sep 30, 2021
1 parent 720ce15 commit ebf395c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ void LBManager::printLBArgsHelp(LBType lb) {
case LBType::RandomLB:
help = lb::RandomLB::getInputKeysWithHelp();
break;
case LBType::StatsMapLB:
help = lb::StatsMapLB::getInputKeysWithHelp();
break;
# if vt_check_enabled(zoltan)
case LBType::ZoltanLB:
help = lb::ZoltanLB::getInputKeysWithHelp();
break;
# endif
case LBType::NoLB:
// deliberately skip retrieving arguments
break;
Expand Down
6 changes: 6 additions & 0 deletions src/vt/vrt/collection/balance/statsmaplb/statsmaplb.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

#include "vt/objgroup/proxy/proxy_objgroup.h"

#include <unordered_map>

namespace vt { namespace vrt { namespace collection { namespace lb {

struct BaseLB;
Expand All @@ -62,6 +64,10 @@ struct StatsMapLB : BaseLB {
void runLB() override;
void inputParams(balance::SpecEntry* spec) override { }

static std::unordered_map<std::string, std::string> getInputKeysWithHelp() {
return std::unordered_map<std::string, std::string>{};
}

private:
objgroup::proxy::Proxy<StatsMapLB> proxy_ = {};
};
Expand Down
28 changes: 28 additions & 0 deletions src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,34 @@ void ZoltanLB::init(objgroup::proxy::Proxy<ZoltanLB> in_proxy) {
proxy = in_proxy;
}

/*static*/ std::unordered_map<std::string, std::string>
ZoltanLB::getInputKeysWithHelp() {
std::string const read_manual = "Please read Zoltan manual.";
std::unordered_map<std::string, std::string> const keys_help = {
{"LB_APPROACH", read_manual },
{"DEBUG_LEVEL", read_manual },
{"FINAL_OUTPUT", read_manual },
{"DEBUG_PROCESSOR", read_manual },
{"CHECK_HYPERGRAPH", read_manual },
{"PHG_EDGE_WEIGHT_OPERATION", read_manual },
{"IMBALANCE_TOL", read_manual },
{"PHG_REPART_MULTIPLIER", read_manual },
{"PHG_EDGE_WEIGHT_OPERATION", read_manual },
{"PHG_CUT_OBJECTIVE", read_manual },
{"PHG_OUTPUT_LEVEL", read_manual },
{"PHG_COARSENING_METHOD", read_manual },
{"PHG_COARSEPARTITION_METHOD", read_manual },
{"PHG_REFINEMENT_QUALITY", read_manual },
{"PHG_RANDOMIZE_INPUT", read_manual },
{"PHG_EDGE_SIZE_THRESHOLD", read_manual },
{"PHG_PROCESSOR_REDUCTION_LIMIT", read_manual },
{"PHG_REFINEMENT_METHOD", read_manual },
{"PHG_MULTILEVEL", read_manual },
{"SEED", read_manual }
};
return keys_help;
}

void ZoltanLB::inputParams(balance::SpecEntry* spec) {
zoltan_config_ = {
{"LB_APPROACH", "REPARTITION" },
Expand Down
2 changes: 2 additions & 0 deletions src/vt/vrt/collection/balance/zoltanlb/zoltanlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ struct ZoltanLB : BaseLB {
void runLB() override;
void inputParams(balance::SpecEntry* spec) override;

static std::unordered_map<std::string, std::string> getInputKeysWithHelp();

private:
struct Graph {
using GID = std::unique_ptr<ZOLTAN_ID_TYPE[]>;
Expand Down

0 comments on commit ebf395c

Please sign in to comment.