diff --git a/src/collective/tracker.cc b/src/collective/tracker.cc index 9441ab449080..546c6a01faeb 100644 --- a/src/collective/tracker.cc +++ b/src/collective/tracker.cc @@ -111,12 +111,14 @@ RabitTracker::WorkerProxy::WorkerProxy(std::int32_t world, TCPSocket sock, SockA } RabitTracker::RabitTracker(Json const& config) : Tracker{config} { - std::string self; auto rc = Success() << [&] { - return collective::GetHostAddress(&self); + host_.clear(); + host_ = OptionalArg(config, "host", std::string{}); + if (host_.empty()) { + return collective::GetHostAddress(&host_); + } + return Success(); } << [&] { - host_ = OptionalArg(config, "host", self); - auto addr = MakeSockAddress(xgboost::StringView{host_}, 0); listener_ = TCPSocket::Create(addr.IsV4() ? SockDomain::kV4 : SockDomain::kV6); return listener_.Bind(host_, &this->port_); diff --git a/src/common/cuda_pinned_allocator.h b/src/common/cuda_pinned_allocator.h index d11851d99d37..6fe1757fd369 100644 --- a/src/common/cuda_pinned_allocator.h +++ b/src/common/cuda_pinned_allocator.h @@ -61,6 +61,8 @@ class pinned_allocator { XGBOOST_DEVICE inline ~pinned_allocator() {} // NOLINT: host/device markup ignored on defaulted functions XGBOOST_DEVICE inline pinned_allocator(pinned_allocator const&) {} // NOLINT: host/device markup ignored on defaulted functions + pinned_allocator& operator=(pinned_allocator const& that) = default; + pinned_allocator& operator=(pinned_allocator&& that) = default; template XGBOOST_DEVICE inline pinned_allocator(pinned_allocator const&) {} // NOLINT