Tpetra: CrsMatrix NonlocalAfterResume test fails
Created by: mhoemmen
@trilinos/tpetra @kddevin
I'm working on a fix for this.
Current Behavior
Tpetra::CrsMatrix
's "NonlocalAfterResume" test is failing for me, on GCC 4.9.3 with OpenMPI 1.10.1 and OpenMP enabled. It looks like something is attempting to create a Teuchos::ArrayView
with nonnull pointer and zero length. Teuchos::ArrayView
's constructor forbids this in debug mode.
Motivation and Context
I discovered this while working on a fix for #4194 (closed).
Possible Solution
Fix getArrayViewFromDualView
in tpetra/core/src/Tpetra_Util.hpp
, so that it replaces the pointer with nullptr
if the length is zero. Kokkos no longer promises that the result of .data()
is nonnull if the pointer is nonnull. See the now closed Kokkos issue https://github.com/kokkos/kokkos/issues/1870 for details.