From a22238e069fb684d0be110dafeb343b381eda454 Mon Sep 17 00:00:00 2001 From: David Andrs Date: Wed, 4 Feb 2026 13:50:38 -0700 Subject: [PATCH] Fixing compiler warning about VLA (Clang extension) (#3769) --- src/eigenvalue.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/eigenvalue.cpp b/src/eigenvalue.cpp index 2fb9dabf16..dc4fbb420b 100644 --- a/src/eigenvalue.cpp +++ b/src/eigenvalue.cpp @@ -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 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