Commit 23eddc1d authored by Augustin Degomme's avatar Augustin Degomme

Fix issue with copy avoidance, which was merely working by accident in most cases.

That was causing HPL to loop.
parent cddf2ac3
Pipeline #192611 passed with stages
in 21 minutes and 24 seconds
......@@ -179,7 +179,7 @@ void smpi_comm_copy_buffer_callback(simgrid::kernel::activity::CommImpl* comm, v
XBT_DEBUG("Copy the data over");
if(smpi_is_shared(buff, src_private_blocks, &src_offset)) {
src_private_blocks = shift_and_frame_private_blocks(src_private_blocks, src_offset, buff_size);
if (src_private_blocks.size()==1 && (src_private_blocks[0].second - src_private_blocks[0].first)==buff_size){//simple shared malloc ... return.
if (src_private_blocks.size()==0){//simple shared malloc ... return.
XBT_VERB("Sender is shared. Let's ignore it.");
smpi_cleanup_comm_after_copy(comm, buff);
return;
......@@ -191,7 +191,7 @@ void smpi_comm_copy_buffer_callback(simgrid::kernel::activity::CommImpl* comm, v
}
if (smpi_is_shared((char*)comm->dst_buff_, dst_private_blocks, &dst_offset)) {
dst_private_blocks = shift_and_frame_private_blocks(dst_private_blocks, dst_offset, buff_size);
if (src_private_blocks.size()==1 && (src_private_blocks[0].second - src_private_blocks[0].first)==buff_size){//simple shared malloc ... return.
if (dst_private_blocks.size()==0){//simple shared malloc ... return.
XBT_VERB("Receiver is shared. Let's ignore it.");
smpi_cleanup_comm_after_copy(comm, buff);
return;
......
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