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 minor integer type mismatches #3133

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions nestkernel/mpi_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ nest::MPIManager::communicate_Allgather( std::vector< unsigned int >& send_buffe
int disp = 0;
unsigned int max_recv_count = send_buffer_size_;
bool overflow = false;
for ( int pid = 0; pid < get_num_processes(); ++pid )
for ( size_t pid = 0; pid < get_num_processes(); ++pid )
{
unsigned int block_disp = pid * send_buffer_size_;
displacements[ pid ] = disp;
Expand Down Expand Up @@ -470,7 +470,7 @@ nest::MPIManager::communicate_Allgather( std::vector< T >& send_buffer,
int disp = 0;
unsigned int max_recv_count = send_buffer_size_;
bool overflow = false;
for ( int pid = 0; pid < get_num_processes(); ++pid )
for ( size_t pid = 0; pid < get_num_processes(); ++pid )
{
unsigned int block_disp = pid * send_buffer_size_;
displacements[ pid ] = disp;
Expand Down Expand Up @@ -560,7 +560,7 @@ nest::MPIManager::communicate_Allgather( std::vector< OffGridSpike >& send_buffe
int disp = 0;
unsigned int max_recv_count = send_buffer_size_;
bool overflow = false;
for ( int pid = 0; pid < get_num_processes(); ++pid )
for ( size_t pid = 0; pid < get_num_processes(); ++pid )
{
unsigned int block_disp = pid * send_buffer_size_;
displacements[ pid ] = disp;
Expand Down Expand Up @@ -604,7 +604,7 @@ nest::MPIManager::communicate( std::vector< double >& send_buffer,
communicate( n_nodes );
// Set up displacements vector.
displacements.resize( get_num_processes(), 0 );
for ( int i = 1; i < get_num_processes(); ++i )
for ( size_t i = 1; i < get_num_processes(); ++i )
{
displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 );
}
Expand Down Expand Up @@ -864,7 +864,7 @@ nest::MPIManager::time_communicatev( int num_bytes, int samples )
std::vector< int > n_nodes( get_num_processes(), packet_length );
std::vector< int > displacements( get_num_processes(), 0 );

for ( int i = 1; i < get_num_processes(); ++i )
for ( size_t i = 1; i < get_num_processes(); ++i )
{
displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 );
}
Expand Down Expand Up @@ -963,7 +963,7 @@ nest::MPIManager::time_communicate_alltoallv( int num_bytes, int samples )
std::vector< int > n_nodes( get_num_processes(), packet_length );
std::vector< int > displacements( get_num_processes(), 0 );

for ( int i = 1; i < get_num_processes(); ++i )
for ( size_t i = 1; i < get_num_processes(); ++i )
{
displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 );
}
Expand Down
3 changes: 2 additions & 1 deletion nestkernel/vp_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ inline void
nest::VPManager::assert_thread_parallel() const
{
#ifdef _OPENMP
assert( omp_get_num_threads() == n_threads_ );
// omp_get_num_threads() returns int
assert( omp_get_num_threads() == static_cast< int >( n_threads_ ) );
#endif
}

Expand Down
Loading