@@ -1172,21 +1172,19 @@ std::unique_ptr<Communicator::Future> UCXX::recv_sync_host_data(
11721172std::pair<std::unique_ptr<std::vector<uint8_t >>, Rank> UCXX::recv_any (Tag tag) {
11731173 progress_worker ();
11741174 auto probe = shared_resources_->get_worker ()->tagProbe (
1175- ::ucxx::Tag (static_cast <int >(tag)), UserTagMask
1175+ ::ucxx::Tag (static_cast <int >(tag)), UserTagMask, true
11761176 );
1177- auto msg_available = probe.first ;
1178- auto info = probe.second ;
1179- auto sender_rank = static_cast <Rank>(info.senderTag >> 32 );
1177+ auto msg_available = probe->isMatched ();
11801178 if (!msg_available) {
11811179 return {nullptr , 0 };
11821180 }
1181+ auto info = probe->getInfo ();
1182+ auto sender_rank = static_cast <Rank>(info.senderTag >> 32 );
11831183 auto msg = std::make_unique<std::vector<uint8_t >>(
11841184 info.length
11851185 ); // TODO: choose between host and device
11861186
1187- auto req = shared_resources_->get_worker ()->tagRecv (
1188- msg->data (), msg->size (), ::ucxx::Tag (static_cast <int >(tag)), UserTagMask
1189- );
1187+ auto req = shared_resources_->get_worker ()->tagRecvWithHandle (msg->data (), probe);
11901188
11911189 while (!req->isCompleted ()) {
11921190 progress_worker ();
@@ -1199,23 +1197,18 @@ std::pair<std::unique_ptr<std::vector<uint8_t>>, Rank> UCXX::recv_any(Tag tag) {
11991197std::unique_ptr<std::vector<uint8_t >> UCXX::recv_from (Rank src, Tag tag) {
12001198 progress_worker ();
12011199 auto probe = shared_resources_->get_worker ()->tagProbe (
1202- tag_with_rank (src, static_cast <int >(tag)), ::ucxx::TagMaskFull
1200+ tag_with_rank (src, static_cast <int >(tag)), ::ucxx::TagMaskFull, true
12031201 );
1204- auto msg_available = probe.first ;
1205- auto info = probe.second ;
1202+ auto msg_available = probe->isMatched ();
12061203 if (!msg_available) {
12071204 return nullptr ;
12081205 }
1206+ auto info = probe->getInfo ();
12091207 auto msg = std::make_unique<std::vector<uint8_t >>(
12101208 info.length
12111209 ); // TODO: choose between host and device
12121210
1213- auto req = shared_resources_->get_worker ()->tagRecv (
1214- msg->data (),
1215- msg->size (),
1216- tag_with_rank (src, static_cast <int >(tag)),
1217- ::ucxx::TagMaskFull
1218- );
1211+ auto req = shared_resources_->get_worker ()->tagRecvWithHandle (msg->data (), probe);
12191212
12201213 while (!req->isCompleted ()) {
12211214 progress_worker ();
0 commit comments