Commit dba6676c authored by incardon's avatar incardon

Fixing communications in case of known size and processors

parent d2f79fe7
......@@ -144,6 +144,7 @@ class Vcluster: public Vcluster_base
{
Vcluster_base::sendrecvMultipleMessagesNBX(prc_send.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send.getPointer(),(void **)send_buf.getPointer(),
prc_recv.size(),(size_t *)prc_recv.getPointer(),msg_alloc_known,(void *)&bi);
sz_recv_byte = sz_recv_tmp;
}
}
else
......
......@@ -782,6 +782,11 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_sendrecv_receive_size_known)
prc_send.add((i + vcl.getProcessUnitID()) % vcl.getProcessingUnits());
}
// We receive to fill prc_recv2 and sz_recv2
vcl.SSendRecv(v1,v2,prc_send,prc_recv2,sz_recv2);
// We reset v2 and we receive again saying that the processors are known and we know the elements
v2.clear();
vcl.SSendRecv(v1,v2,prc_send,prc_recv2,sz_recv2,RECEIVE_KNOWN | KNOWN_ELEMENT_OR_BYTE);
vcl.SSendRecv(v1,v3,prc_send,prc_recv3,sz_recv3);
......@@ -858,6 +863,14 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_sendrecv_receive_known)
prc_send.add((i + vcl.getProcessUnitID()) % vcl.getProcessingUnits());
}
// Receive to fill prc_recv2
vcl.SSendRecv(v1,v2,prc_send,prc_recv2,sz_recv2);
// Reset v2 and sz_recv2
v2.clear();
sz_recv2.clear();
vcl.SSendRecv(v1,v2,prc_send,prc_recv2,sz_recv2,RECEIVE_KNOWN);
vcl.SSendRecv(v1,v3,prc_send,prc_recv3,sz_recv3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment