Skip to content

Commit

Permalink
Debug log.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Apr 11, 2024
1 parent abc430e commit a3e0bd9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ object XGBoost extends XGBoostStageLevel {
logger.error("the job was aborted due to ", t)
throw t
} finally {
Console.println("[td]: Call tracker shutdown.")
optionalCachedRDD.foreach(_.unpersist())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,4 @@ class XGBoostGeneralSuite extends AnyFunSuite with TmpFolderPerSuite with PerTes
xgb.fit(trainingDF)
}
}

}
2 changes: 2 additions & 0 deletions src/collective/comm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ Comm* RabitComm::MakeCUDAVar(Context const*, std::shared_ptr<Coll>) const {

[[nodiscard]] Result RabitComm::Bootstrap(std::chrono::seconds timeout, std::int32_t retry,
std::string task_id) {
std::cout << "[comm]: bootstrap:" << getpid() << std::endl;
TCPSocket tracker;
std::int32_t world{-1};
auto rc = ConnectTrackerImpl(this->TrackerInfo(), timeout, retry, task_id, &tracker, this->Rank(),
Expand Down Expand Up @@ -351,6 +352,7 @@ RabitComm::~RabitComm() noexcept(false) {
}

[[nodiscard]] Result RabitComm::Shutdown() {
std::cout << "[comm]: shutdown" << std::endl;
if (!this->IsDistributed()) {
return Success();
}
Expand Down
2 changes: 2 additions & 0 deletions src/collective/tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ Result RabitTracker::Bootstrap(std::vector<WorkerProxy>* p_workers) {
// The worker can still send shutdown after call to `std::exit`.
continue;
}
std::cout << "[tracker]: shutdown" << std::endl;
state.Shutdown();
continue;
}
Expand Down Expand Up @@ -344,6 +345,7 @@ Result RabitTracker::Bootstrap(std::vector<WorkerProxy>* p_workers) {
}

[[nodiscard]] Result RabitTracker::Stop() {
std::cout << "[tracker]: stop" << std::endl;
if (!this->Ready()) {
return Success();
}
Expand Down

0 comments on commit a3e0bd9

Please sign in to comment.