Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misuse of outdated variable that led to an impossible condition #1416

Merged
merged 1 commit into from
Feb 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions nestkernel/event_delivery_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ EventDeliveryManager::collocate_target_data_buffers_( const thread tid,
const AssignedRanks& assigned_ranks,
SendBufferPosition& send_buffer_position )
{
unsigned int num_target_data_written = 0;
thread source_rank;
TargetData next_target_data;
bool valid_next_target_data;
Expand Down Expand Up @@ -679,7 +678,7 @@ EventDeliveryManager::collocate_target_data_buffers_( const thread tid,
tid, assigned_ranks.begin, assigned_ranks.end, source_rank, next_target_data );
if ( valid_next_target_data ) // add valid entry to MPI buffer
{
if ( send_buffer_position.idx( source_rank ) == send_buffer_position.end( source_rank ) )
if ( send_buffer_position.is_chunk_filled( source_rank ) )
{
// entry does not fit in this part of the MPI buffer any more,
// so we need to reject it
Expand All @@ -691,8 +690,7 @@ EventDeliveryManager::collocate_target_data_buffers_( const thread tid,
// we have just rejected an entry, so source table can not be
// fully read
is_source_table_read = false;
if ( num_target_data_written
== ( send_buffer_position.send_recv_count_per_rank * assigned_ranks.size ) ) // buffer is full
if ( send_buffer_position.are_all_chunks_filled() ) // buffer is full
{
return is_source_table_read;
}
Expand Down