From 2e267bd6a829cbea5ae70a52c3c5d1096037b0da Mon Sep 17 00:00:00 2001 From: Angelos Katharopoulos Date: Fri, 6 Sep 2024 11:02:29 -0700 Subject: [PATCH] Fix run without distributed --- mlx/distributed/sockets/sockets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlx/distributed/sockets/sockets.cpp b/mlx/distributed/sockets/sockets.cpp index 806893e2e..0b9b38c58 100644 --- a/mlx/distributed/sockets/sockets.cpp +++ b/mlx/distributed/sockets/sockets.cpp @@ -168,7 +168,7 @@ struct GroupImpl { int success; // If we are expecting anyone to connect to us - if (rank_ < peers.size() - 1) { + if (rank_ + 1 < peers.size()) { // Create the socket to wait for connections from the peers int sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) {