Skip to content

Commit

Permalink
Hotfix to problem in SyncBuffer
Browse files Browse the repository at this point in the history
This should alleviate the problem of different Allgather send sizes
until the next merge with develop.
  • Loading branch information
fzenke committed Feb 19, 2019
1 parent 1610e83 commit a452e05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/auryn/SyncBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ void SyncBuffer::sync()
T1 = MPI_Wtime(); /* start time */
#endif
if ( send_buf.size() <= max_send_size ) {
ierr = MPI_Allgather(send_buf.data(), send_buf.size(), MPI_UNSIGNED,
recv_buf.data(), max_send_size, MPI_UNSIGNED, *mpicom);
ierr = MPI_Allgather(send_buf.data(), max_send_size, MPI_UNSIGNED,
recv_buf.data(), max_send_size, MPI_UNSIGNED, *mpicom);
} else {
// Create an overflow package
// std::cout << " overflow " << overflow_value << " " << send_buf.size() << std::endl;
NeuronID overflow_data [2];
NeuronID overflow_data [max_send_size];
overflow_data[0] = overflow_value;
overflow_data[1] = send_buf.size();
ierr = MPI_Allgather(&overflow_data, 2, MPI_UNSIGNED,
ierr = MPI_Allgather(&overflow_data, max_send_size, MPI_UNSIGNED,
recv_buf.data(), max_send_size, MPI_UNSIGNED, *mpicom);
}

Expand Down

0 comments on commit a452e05

Please sign in to comment.