From 23eddc1ded2b03b4d73e4a98e7ba6b2ec9b63667 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Mon, 2 Dec 2019 16:05:21 +0100 Subject: [PATCH] Fix issue with copy avoidance, which was merely working by accident in most cases. That was causing HPL to loop. --- src/smpi/internals/smpi_global.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index 5325b9df67..a2d7e50918 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -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; -- 2.20.1