Fixing compiler warning about VLA (Clang extension) (#3769)

This commit is contained in:
David Andrs 2026-02-04 13:50:38 -07:00 committed by GitHub
parent b41e22f68b
commit a22238e069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -192,9 +192,9 @@ void synchronize_bank()
// TODO: protect for MPI_Exscan at rank 0
// Allocate space for bank_position if this hasn't been done yet
int64_t bank_position[mpi::n_procs];
MPI_Allgather(
&start, 1, MPI_INT64_T, bank_position, 1, MPI_INT64_T, mpi::intracomm);
std::vector<int64_t> bank_position(mpi::n_procs);
MPI_Allgather(&start, 1, MPI_INT64_T, bank_position.data(), 1, MPI_INT64_T,
mpi::intracomm);
#else
start = 0;
finish = index_temp;
@ -289,7 +289,7 @@ void synchronize_bank()
neighbor = mpi::n_procs - 1;
} else {
neighbor =
upper_bound_index(bank_position, bank_position + mpi::n_procs, start);
upper_bound_index(bank_position.begin(), bank_position.end(), start);
}
// Resize IFP receive buffers