diff --git a/paddle/fluid/imperative/nccl_context.cc b/paddle/fluid/imperative/nccl_context.cc index f96c83936df590e5bd3abe89b7e7c2a6ddf92d01..d9630bd66d5b85db3a95e865b12f5c2e5c154fcf 100644 --- a/paddle/fluid/imperative/nccl_context.cc +++ b/paddle/fluid/imperative/nccl_context.cc @@ -93,6 +93,7 @@ void NCCLParallelContext::SendNCCLID(const std::string &ep, send(sock, buffer, NCCL_UNIQUE_ID_BYTES, 0); break; } + close(sock); } void NCCLParallelContext::BcastNCCLId(ncclUniqueId *nccl_id, int root) {