Tpetra: build error in unpackAndCombineNew
Created by: aprokop
@trilinos/tpetra @mhoemmen @tjfulle
For some reason, the code does not compile unless tfectFuncName
is moved outside of HAVE_TPETRA_DEBUG
. It's a bit of mystery to me as I though it would only be used in TEUCHOS_TEST_FOR_EXCEPTION
which is hidden behind the macro.
The corresponding error:
In file included from ../../packages/teuchos/core/src/Teuchos_Assert.hpp:46:0,
from ../../packages/teuchos/core/src/Teuchos_any.hpp:51,
from ../../packages/teuchos/core/src/Teuchos_RCPNode.hpp:53,
from ../../packages/teuchos/core/src/Teuchos_ArrayViewDecl.hpp:46,
from ../../packages/teuchos/core/src/Teuchos_ArrayView.hpp:46,
from ../../packages/teuchos/kokkoscompat/src/KokkosCompat_View.hpp:59,
from ../../packages/teuchos/kokkoscompat/src/KokkosCompat_ClassicNodeAPI_Wrapper.hpp:5,
from packages/tpetra/core/src/Tpetra_MultiVector_INT_INT_INT_SERIAL.cpp:68:
../../packages/tpetra/core/src/Tpetra_MultiVector_def.hpp: In member function ‘virtual void Tpetra::MultiVector<S, LO, GO, N, classic>::unpackAndCombineNew(const Kokkos::DualView<const LocalOrdinal*, typename N
ode::device_type>&, const Kokkos::DualView<const typename Kokkos::Details::ArithTraits<RealFloatType>::val_type*, typename Tpetra::DistObject<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic>::buffer_device_t
ype>&, const Kokkos::DualView<const long unsigned int*, typename Tpetra::DistObject<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic>::buffer_device_type>&, size_t, Tpetra::Distributor&, Tpetra::CombineMode)’
:
../../packages/teuchos/core/src/Teuchos_TestForException.hpp:232:40: error: ‘tfecfFuncName’ was not declared in this scope
Teuchos::typeName(*this) << "::" << tfecfFuncName << msg ) \
^
../../packages/teuchos/core/src/Teuchos_TestForException.hpp:179:10: note: in definition of macro ‘TEUCHOS_TEST_FOR_EXCEPTION’
<< msg; \
^~~
../../packages/tpetra/core/src/Tpetra_MultiVector_def.hpp:1698:9: note: in expansion of macro ‘TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC’
TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC
^