diff --git a/rabit/src/allreduce_base.cc b/rabit/src/allreduce_base.cc index 563898a30..e123b52d8 100644 --- a/rabit/src/allreduce_base.cc +++ b/rabit/src/allreduce_base.cc @@ -200,12 +200,6 @@ void AllreduceBase::SetParam(const char *name, const char *val) { if (!strcmp(name, "DMLC_WORKER_CONNECT_RETRY")) { connect_retry = atoi(val); } - if (!strcmp(name, "rabit_bootstrap_cache")) { - rabit_bootstrap_cache = utils::StringToBool(val); - } - if (!strcmp(name, "rabit_debug")) { - rabit_debug = utils::StringToBool(val); - } if (!strcmp(name, "rabit_timeout")) { rabit_timeout = utils::StringToBool(val); } diff --git a/rabit/src/allreduce_base.h b/rabit/src/allreduce_base.h index a3b67c980..67fef0ba6 100644 --- a/rabit/src/allreduce_base.h +++ b/rabit/src/allreduce_base.h @@ -487,10 +487,6 @@ class AllreduceBase : public IEngine { int world_size; // NOLINT // connect retry time int connect_retry; // NOLINT - // enable bootstrap cache 0 false 1 true - bool rabit_bootstrap_cache = false; // NOLINT - // enable detailed logging - bool rabit_debug = false; // NOLINT // by default, if rabit worker not recover in half an hour exit std::chrono::seconds timeout_sec{std::chrono::seconds{1800}}; // NOLINT // flag to enable rabit_timeout diff --git a/tests/cpp/rabit/allreduce_base_test.cc b/tests/cpp/rabit/allreduce_base_test.cc index 8983e9aa6..55cce5c7d 100644 --- a/tests/cpp/rabit/allreduce_base_test.cc +++ b/tests/cpp/rabit/allreduce_base_test.cc @@ -20,32 +20,6 @@ TEST(AllreduceBase, InitTask) EXPECT_EQ(base.task_id, "1"); } -TEST(AllreduceBase, InitWithCacheOn) -{ - rabit::engine::AllreduceBase base; - - std::string rabit_task_id = "rabit_task_id=1"; - char cmd[rabit_task_id.size()+1]; - std::copy(rabit_task_id.begin(), rabit_task_id.end(), cmd); - cmd[rabit_task_id.size()] = '\0'; - - std::string rabit_bootstrap_cache = "rabit_bootstrap_cache=1"; - char cmd2[rabit_bootstrap_cache.size()+1]; - std::copy(rabit_bootstrap_cache.begin(), rabit_bootstrap_cache.end(), cmd2); - cmd2[rabit_bootstrap_cache.size()] = '\0'; - - std::string rabit_debug = "rabit_debug=1"; - char cmd3[rabit_debug.size()+1]; - std::copy(rabit_debug.begin(), rabit_debug.end(), cmd3); - cmd3[rabit_debug.size()] = '\0'; - - char* argv[] = {cmd, cmd2, cmd3}; - base.Init(3, argv); - EXPECT_EQ(base.task_id, "1"); - EXPECT_TRUE(base.rabit_bootstrap_cache); - EXPECT_EQ(base.rabit_debug, 1); -} - TEST(AllreduceBase, InitWithRingReduce) { rabit::engine::AllreduceBase base;