Skip to content

Commit 306281a

Browse files
authored
gloo/tcp: better error message on collective mismatch
Differential Revision: D78377800 Pull Request resolved: #456
1 parent c37d821 commit 306281a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gloo/transport/tcp/pair.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,10 @@ ssize_t Pair::prepareRead(
453453
iov.iov_len = op.preamble.length - offset;
454454

455455
// Bytes read must be in bounds for target buffer
456-
GLOO_ENFORCE_LE(op.preamble.length, op.nbytes);
456+
GLOO_ENFORCE_LE(
457+
op.preamble.length,
458+
op.nbytes,
459+
"Received data size doesn't match expected size. Is there a distributed collective mismatch in your code?");
457460
return iov.iov_len;
458461
}
459462

0 commit comments

Comments
 (0)