Skip to content

Commit

Permalink
Disable custom truncate behavior
Browse files Browse the repository at this point in the history
See rapidsai#104 for details.
  • Loading branch information
pentschev committed Oct 17, 2023
1 parent 8e8b764 commit 6ab8a62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cpp/src/request_tag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ RequestTag::RequestTag(std::shared_ptr<Component> endpointOrWorker,

void RequestTag::callback(void* request, ucs_status_t status, const ucp_tag_recv_info_t* info)
{
if (status != UCS_ERR_CANCELED && info->length != _length) {
status = UCS_ERR_MESSAGE_TRUNCATED;
const char* fmt = "length mismatch: %llu (got) != %llu (expected)";
size_t len = std::snprintf(nullptr, 0, fmt, info->length, _length);
_status_msg = std::string(len + 1, '\0'); // +1 for null terminator
std::snprintf(_status_msg.data(), _status_msg.size(), fmt, info->length, _length);
}
// TODO: Decide on behavior. See https://github.com/rapidsai/ucxx/issues/104 .
// if (status != UCS_ERR_CANCELED && info->length != _length) {
// status = UCS_ERR_MESSAGE_TRUNCATED;
// const char* fmt = "length mismatch: %llu (got) != %llu (expected)";
// size_t len = std::snprintf(nullptr, 0, fmt, info->length, _length);
// _status_msg = std::string(len + 1, '\0'); // +1 for null terminator
// std::snprintf(_status_msg.data(), _status_msg.size(), fmt, info->length, _length);
// }

Request::callback(request, status);
}
Expand Down
1 change: 1 addition & 0 deletions python/ucxx/_lib_async/tests/test_send_recv.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ async def test_send_recv_numba(size, dtype):


@pytest.mark.asyncio
@pytest.mark.skip(reason="See https://github.com/rapidsai/ucxx/issues/104")
async def test_send_recv_error():
async def say_hey_server(ep):
await ep.send(bytearray(b"Hey"))
Expand Down

0 comments on commit 6ab8a62

Please sign in to comment.