Skip to content

Commit aea1bff

Browse files
committed
fix(bootstrap): guard PALS success log on valid ranks and size
1 parent 254909c commit aea1bff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comms/torchcomms/TorchCommUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ std::pair<int, int> query_pals_ranksize() {
149149
TC_LOG(WARNING)
150150
<< "Found size from PALS/PBS environment but unable to determine rank. "
151151
<< "Please set PALS_RANKID.";
152-
} else {
152+
} else if (rank > -1 && comm_size > 0) {
153153
TC_LOG(INFO) << "Found rank and size from PALS/PBS environment (rank="
154154
<< rank << ", size=" << comm_size << ").";
155155
}

0 commit comments

Comments
 (0)