From 6870a3e9862c2b4ecd7ba9b3ab3ced074e0079eb Mon Sep 17 00:00:00 2001 From: Chris Siefert Date: Wed, 20 Oct 2021 21:00:50 -0600 Subject: [PATCH] Tpetra: Fixing stride bug --- packages/tpetra/core/src/Tpetra_MultiVector_def.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp b/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp index deb9a3d2617b..f13ca22e662d 100644 --- a/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp +++ b/packages/tpetra/core/src/Tpetra_MultiVector_def.hpp @@ -322,7 +322,9 @@ namespace { // (anonymous) { // FIXME (mfh 15 Mar 2019) DualView doesn't have a stride // method yet, but its Views do. - size_t strides[WrappedOrNotDualViewType::t_dev::Rank]; + // NOTE: dv.stride() returns a vector of length one + // more than its rank + size_t strides[WrappedOrNotDualViewType::t_dev::Rank+1]; dv.stride(strides); const size_t LDA = strides[1]; const size_t numRows = dv.extent (0);