diff --git a/packages/amesos2/CMakeLists.txt b/packages/amesos2/CMakeLists.txt index 16a4ef8730e9..390667889b67 100644 --- a/packages/amesos2/CMakeLists.txt +++ b/packages/amesos2/CMakeLists.txt @@ -67,10 +67,6 @@ TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_KLU2 ON ) -IF (Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP) - tribits_disable_optional_dependency(ShyLU_NodeTacho "NOTE: Disabling ${PACKAGE_NAME}_ENABLE_ShyLU_NodeTacho because CUDA or HIP is enabled in Kokkos") -ENDIF() - TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Basker HAVE_AMESOS2_BASKER "Enable Basker in Amesos2" diff --git a/packages/kokkos-kernels/example/wiki/sparse/KokkosSparse_wiki_bsrmatrix.cpp b/packages/kokkos-kernels/example/wiki/sparse/KokkosSparse_wiki_bsrmatrix.cpp index 6a67c1aec482..eacf134f89da 100644 --- a/packages/kokkos-kernels/example/wiki/sparse/KokkosSparse_wiki_bsrmatrix.cpp +++ b/packages/kokkos-kernels/example/wiki/sparse/KokkosSparse_wiki_bsrmatrix.cpp @@ -15,6 +15,7 @@ //@HEADER #include +#include #include "Kokkos_Core.hpp" diff --git a/packages/muelu/adapters/stratimikos/Xpetra_ThyraLinearOp.hpp b/packages/muelu/adapters/stratimikos/Xpetra_ThyraLinearOp.hpp index 60d8261c7063..e83a926fdb26 100644 --- a/packages/muelu/adapters/stratimikos/Xpetra_ThyraLinearOp.hpp +++ b/packages/muelu/adapters/stratimikos/Xpetra_ThyraLinearOp.hpp @@ -90,12 +90,12 @@ class XpetraThyraLinearOp : public Xpetra::Operator> getDomainMap() const { + const Teuchos::RCP> getDomainMap() const { throw Exceptions::RuntimeError("Interface not supported"); } // //! Returns the Tpetra::Map object associated with the range of this operator. - Teuchos::RCP> getRangeMap() const { + const Teuchos::RCP> getRangeMap() const { throw Exceptions::RuntimeError("Interface not supported"); } @@ -171,12 +171,12 @@ class XpetraThyraLinearOp : public Xp //@} //! Returns the Tpetra::Map object associated with the domain of this operator. - Teuchos::RCP> getDomainMap() const { + const Teuchos::RCP> getDomainMap() const { return A_->getDomainMap(); } // //! Returns the Tpetra::Map object associated with the range of this operator. - Teuchos::RCP> getRangeMap() const { + const Teuchos::RCP> getRangeMap() const { return A_->getRangeMap(); } diff --git a/packages/muelu/src/Interface/MueLu_FactoryFactory_decl.hpp b/packages/muelu/src/Interface/MueLu_FactoryFactory_decl.hpp index 0e78614eecc9..b97c8a48ff72 100644 --- a/packages/muelu/src/Interface/MueLu_FactoryFactory_decl.hpp +++ b/packages/muelu/src/Interface/MueLu_FactoryFactory_decl.hpp @@ -163,8 +163,8 @@ #include "MueLu_GeometricInterpolationPFactory_kokkos.hpp" #ifdef HAVE_MUELU_DEPRECATED_CODE #include "MueLu_NullspaceFactory_kokkos.hpp" -#endif #include "MueLu_SaPFactory_kokkos.hpp" +#endif #include "MueLu_SemiCoarsenPFactory_kokkos.hpp" #include "MueLu_StructuredAggregationFactory_kokkos.hpp" #include "MueLu_TentativePFactory_kokkos.hpp" @@ -308,8 +308,8 @@ class FactoryFactory : public BaseClass { if (factoryName == "GeometricInterpolationPFactory_kokkos") return Build2(paramList, factoryMapIn, factoryManagersIn); #ifdef HAVE_MUELU_DEPRECATED_CODE if (factoryName == "NullspaceFactory_kokkos") return Build2(paramList, factoryMapIn, factoryManagersIn); -#endif if (factoryName == "SaPFactory_kokkos") return Build2(paramList, factoryMapIn, factoryManagersIn); +#endif if (factoryName == "SemiCoarsenPFactory_kokkos") return Build2(paramList, factoryMapIn, factoryManagersIn); if (factoryName == "StructuredAggregationFactory_kokkos") return Build2(paramList, factoryMapIn, factoryManagersIn); if (factoryName == "TentativePFactory_kokkos") return Build2(paramList, factoryMapIn, factoryManagersIn); diff --git a/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp b/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp index ee960e0c06b6..3594734abd75 100644 --- a/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp +++ b/packages/muelu/src/Interface/MueLu_MLParameterListInterpreter_def.hpp @@ -85,7 +85,6 @@ #include "MueLu_CoalesceDropFactory_kokkos.hpp" // #include "MueLu_CoordinatesTransferFactory_kokkos.hpp" -#include "MueLu_SaPFactory_kokkos.hpp" #include "MueLu_TentativePFactory_kokkos.hpp" #if defined(HAVE_MUELU_ISORROPIA) && defined(HAVE_MPI) @@ -290,11 +289,7 @@ void MLParameterListInterpreter::SetP RFact = rcp(new TransPFactory()); } else if (agg_damping != 0.0 && bEnergyMinimization == false) { // smoothed aggregation (SA-AMG) - RCP SaPFact; - if (useKokkosRefactor) - SaPFact = rcp(new SaPFactory_kokkos()); - else - SaPFact = rcp(new SaPFactory()); + RCP SaPFact = rcp(new SaPFactory()); SaPFact->SetParameter("sa: damping factor", ParameterEntry(agg_damping)); PFact = SaPFact; RFact = rcp(new TransPFactory()); diff --git a/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_decl.hpp b/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_decl.hpp index b361bbf622f2..5519c0e6abb2 100644 --- a/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_decl.hpp +++ b/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_decl.hpp @@ -100,7 +100,6 @@ #endif #include "MueLu_CoalesceDropFactory_kokkos_fwd.hpp" -#include "MueLu_SaPFactory_kokkos_fwd.hpp" #include "MueLu_SemiCoarsenPFactory_kokkos_fwd.hpp" #include "MueLu_TentativePFactory_kokkos_fwd.hpp" diff --git a/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_def.hpp b/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_def.hpp index c2a106d780f1..ab8c801dd922 100644 --- a/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_def.hpp +++ b/packages/muelu/src/Interface/MueLu_ParameterListInterpreter_def.hpp @@ -106,7 +106,6 @@ #include "MueLu_LowPrecisionFactory.hpp" #include "MueLu_CoalesceDropFactory_kokkos.hpp" -#include "MueLu_SaPFactory_kokkos.hpp" #include "MueLu_SemiCoarsenPFactory_kokkos.hpp" #include "MueLu_TentativePFactory_kokkos.hpp" @@ -1940,7 +1939,7 @@ template void ParameterListInterpreter:: UpdateFactoryManager_SA(ParameterList& paramList, const ParameterList& defaultList, FactoryManager& manager, int /* levelID */, std::vector& keeps) const { // Smoothed aggregation - MUELU_KOKKOS_FACTORY(P, SaPFactory, SaPFactory_kokkos); + RCP P = rcp(new SaPFactory()); ParameterList Pparams; if (paramList.isSublist("matrixmatrix: kernel params")) Pparams.sublist("matrixmatrix: kernel params", false) = paramList.sublist("matrixmatrix: kernel params"); diff --git a/packages/muelu/src/MueCentral/MueLu_FactoryManager_decl.hpp b/packages/muelu/src/MueCentral/MueLu_FactoryManager_decl.hpp index 8462a9a2d264..a31d77d22eda 100644 --- a/packages/muelu/src/MueCentral/MueLu_FactoryManager_decl.hpp +++ b/packages/muelu/src/MueCentral/MueLu_FactoryManager_decl.hpp @@ -76,7 +76,6 @@ #include "MueLu_InterfaceAggregationFactory_fwd.hpp" #include "MueLu_CoalesceDropFactory_kokkos_fwd.hpp" -#include "MueLu_SaPFactory_kokkos_fwd.hpp" #include "MueLu_TentativePFactory_kokkos_fwd.hpp" namespace MueLu { diff --git a/packages/muelu/src/MueCentral/MueLu_FactoryManager_def.hpp b/packages/muelu/src/MueCentral/MueLu_FactoryManager_def.hpp index 91db9f15da12..69738822713f 100644 --- a/packages/muelu/src/MueCentral/MueLu_FactoryManager_def.hpp +++ b/packages/muelu/src/MueCentral/MueLu_FactoryManager_def.hpp @@ -78,7 +78,6 @@ #include "MueLu_InverseApproximationFactory.hpp" #include "MueLu_CoalesceDropFactory_kokkos.hpp" -#include "MueLu_SaPFactory_kokkos.hpp" #include "MueLu_TentativePFactory_kokkos.hpp" #include "MueLu_FactoryManager_decl.hpp" @@ -130,11 +129,7 @@ const RCP FactoryManager factory; - if (useKokkos_) - factory = rcp(new SaPFactory_kokkos()); - else - factory = rcp(new SaPFactory()); + RCP factory = rcp(new SaPFactory()); factory->SetFactory("P", GetFactory("Ptent")); return SetAndReturnDefaultFactory(varName, factory); } diff --git a/packages/muelu/src/Operators/MueLu_Maxwell1_decl.hpp b/packages/muelu/src/Operators/MueLu_Maxwell1_decl.hpp index 1902dc6472c3..fa254e89d1d9 100644 --- a/packages/muelu/src/Operators/MueLu_Maxwell1_decl.hpp +++ b/packages/muelu/src/Operators/MueLu_Maxwell1_decl.hpp @@ -196,10 +196,10 @@ class Maxwell1 : public VerboseObject, public Xpetra::Operator getDomainMap() const; + const Teuchos::RCP getDomainMap() const; //! Returns the Xpetra::Map object associated with the range of this operator. - Teuchos::RCP getRangeMap() const; + const Teuchos::RCP getRangeMap() const; //! Returns Jacobian matrix SM const Teuchos::RCP& getJacobian() const { diff --git a/packages/muelu/src/Operators/MueLu_Maxwell1_def.hpp b/packages/muelu/src/Operators/MueLu_Maxwell1_def.hpp index 6f9f47d6404f..bdb4b133422c 100644 --- a/packages/muelu/src/Operators/MueLu_Maxwell1_def.hpp +++ b/packages/muelu/src/Operators/MueLu_Maxwell1_def.hpp @@ -79,12 +79,12 @@ namespace MueLu { template -Teuchos::RCP > Maxwell1::getDomainMap() const { +const Teuchos::RCP > Maxwell1::getDomainMap() const { return SM_Matrix_->getDomainMap(); } template -Teuchos::RCP > Maxwell1::getRangeMap() const { +const Teuchos::RCP > Maxwell1::getRangeMap() const { return SM_Matrix_->getRangeMap(); } diff --git a/packages/muelu/src/Operators/MueLu_MultiPhys_decl.hpp b/packages/muelu/src/Operators/MueLu_MultiPhys_decl.hpp index e1d743e9d7f8..d0203512120a 100644 --- a/packages/muelu/src/Operators/MueLu_MultiPhys_decl.hpp +++ b/packages/muelu/src/Operators/MueLu_MultiPhys_decl.hpp @@ -129,10 +129,10 @@ class MultiPhys : public VerboseObject, public Xpetra::Operator getDomainMap() const; + const Teuchos::RCP getDomainMap() const; //! Returns the Xpetra::Map object associated with the range of this operator. - Teuchos::RCP getRangeMap() const; + const Teuchos::RCP getRangeMap() const; //! Set parameters void setParameters(Teuchos::ParameterList& list); diff --git a/packages/muelu/src/Operators/MueLu_MultiPhys_def.hpp b/packages/muelu/src/Operators/MueLu_MultiPhys_def.hpp index c11ae1e5a4a2..6155dd7f092f 100644 --- a/packages/muelu/src/Operators/MueLu_MultiPhys_def.hpp +++ b/packages/muelu/src/Operators/MueLu_MultiPhys_def.hpp @@ -78,12 +78,12 @@ namespace MueLu { template -Teuchos::RCP> MultiPhys::getDomainMap() const { +const Teuchos::RCP> MultiPhys::getDomainMap() const { return AmatMultiphysics_->getDomainMap(); } template -Teuchos::RCP> MultiPhys::getRangeMap() const { +const Teuchos::RCP> MultiPhys::getRangeMap() const { return AmatMultiphysics_->getRangeMap(); } diff --git a/packages/muelu/src/Operators/MueLu_RefMaxwell_decl.hpp b/packages/muelu/src/Operators/MueLu_RefMaxwell_decl.hpp index 8fee9042150f..3ac15a5f15ed 100644 --- a/packages/muelu/src/Operators/MueLu_RefMaxwell_decl.hpp +++ b/packages/muelu/src/Operators/MueLu_RefMaxwell_decl.hpp @@ -67,7 +67,6 @@ #include "MueLu_CoalesceDropFactory_kokkos_fwd.hpp" #include "MueLu_TentativePFactory_kokkos_fwd.hpp" -#include "MueLu_SaPFactory_kokkos_fwd.hpp" #include "MueLu_ZoltanInterface_fwd.hpp" #include "MueLu_Zoltan2Interface_fwd.hpp" @@ -424,10 +423,10 @@ class RefMaxwell : public VerboseObject, public Xpetra::Operator getDomainMap() const; + const Teuchos::RCP getDomainMap() const; //! Returns the Xpetra::Map object associated with the range of this operator. - Teuchos::RCP getRangeMap() const; + const Teuchos::RCP getRangeMap() const; //! Returns Jacobian matrix SM const Teuchos::RCP &getJacobian() const { diff --git a/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp b/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp index 5f55bde176e2..3b3a6fe66184 100644 --- a/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp +++ b/packages/muelu/src/Operators/MueLu_RefMaxwell_def.hpp @@ -74,7 +74,6 @@ #include "MueLu_CoalesceDropFactory_kokkos.hpp" #include "MueLu_TentativePFactory_kokkos.hpp" -#include "MueLu_SaPFactory_kokkos.hpp" #include #include @@ -122,12 +121,12 @@ Matrix2CrsMatrix(Teuchos::RCP -Teuchos::RCP > RefMaxwell::getDomainMap() const { +const Teuchos::RCP > RefMaxwell::getDomainMap() const { return SM_Matrix_->getDomainMap(); } template -Teuchos::RCP > RefMaxwell::getRangeMap() const { +const Teuchos::RCP > RefMaxwell::getRangeMap() const { return SM_Matrix_->getRangeMap(); } @@ -1752,14 +1751,12 @@ void RefMaxwell::buildNodalProlongato if (useKokkos_) { dropFact = rcp(new CoalesceDropFactory_kokkos()); TentativePFact = rcp(new TentativePFactory_kokkos()); - if (algo == "sa") - SaPFact = rcp(new SaPFactory_kokkos()); } else { dropFact = rcp(new CoalesceDropFactory()); TentativePFact = rcp(new TentativePFactory()); - if (algo == "sa") - SaPFact = rcp(new SaPFactory()); } + if (algo == "sa") + SaPFact = rcp(new SaPFactory()); dropFact->SetFactory("UnAmalgamationInfo", amalgFact); double dropTol = parameterList_.get("aggregation: drop tol"); diff --git a/packages/muelu/src/Operators/MueLu_XpetraOperator_decl.hpp b/packages/muelu/src/Operators/MueLu_XpetraOperator_decl.hpp index 3d0e2a9b2265..0a9a71ec0c69 100644 --- a/packages/muelu/src/Operators/MueLu_XpetraOperator_decl.hpp +++ b/packages/muelu/src/Operators/MueLu_XpetraOperator_decl.hpp @@ -79,10 +79,10 @@ class XpetraOperator : public Xpetra::Operator > getDomainMap() const; + const Teuchos::RCP > getDomainMap() const; //! Returns the Tpetra::Map object associated with the range of this operator. - Teuchos::RCP > getRangeMap() const; + const Teuchos::RCP > getRangeMap() const; //! Returns in Y the result of a Xpetra::Operator applied to a Xpetra::MultiVector X. /*! diff --git a/packages/muelu/src/Operators/MueLu_XpetraOperator_def.hpp b/packages/muelu/src/Operators/MueLu_XpetraOperator_def.hpp index b9540afe0069..c49978a8ddf4 100644 --- a/packages/muelu/src/Operators/MueLu_XpetraOperator_def.hpp +++ b/packages/muelu/src/Operators/MueLu_XpetraOperator_def.hpp @@ -51,7 +51,7 @@ namespace MueLu { template -Teuchos::RCP > +const Teuchos::RCP > XpetraOperator:: getDomainMap() const { typedef Xpetra::Matrix Matrix; @@ -61,7 +61,7 @@ XpetraOperator:: } template -Teuchos::RCP > +const Teuchos::RCP > XpetraOperator:: getRangeMap() const { typedef Xpetra::Matrix Matrix; diff --git a/packages/muelu/src/Rebalancing/MueLu_RebalanceTransferFactory_def.hpp b/packages/muelu/src/Rebalancing/MueLu_RebalanceTransferFactory_def.hpp index 3b002a6cbb91..d51e75de0789 100644 --- a/packages/muelu/src/Rebalancing/MueLu_RebalanceTransferFactory_def.hpp +++ b/packages/muelu/src/Rebalancing/MueLu_RebalanceTransferFactory_def.hpp @@ -236,7 +236,7 @@ void RebalanceTransferFactory::Build( RCP newImporter; { - SubFactoryMonitor(*this, "Import construction", coarseLevel); + SubFactoryMonitor subM2(*this, "Import construction", coarseLevel); newImporter = ImportFactory::Build(importer->getTargetMap(), rebalancedP->getColMap()); } rebalancedP2->replaceDomainMapAndImporter(importer->getTargetMap(), newImporter); diff --git a/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp b/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp index 55f5a0c8cfb7..6d4e606676ac 100644 --- a/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp +++ b/packages/muelu/src/Smoothers/MueLu_Ifpack2Smoother_def.hpp @@ -717,14 +717,14 @@ void Ifpack2Smoother::SetupChebyshev( prec_ = Ifpack2::Factory::create(type_, tA, overlap_); SetPrecParameters(); { - SubFactoryMonitor(*this, "Preconditioner init", currentLevel); + SubFactoryMonitor m(*this, "Preconditioner init", currentLevel); prec_->initialize(); } } else SetPrecParameters(); { - SubFactoryMonitor(*this, "Preconditioner compute", currentLevel); + SubFactoryMonitor m(*this, "Preconditioner compute", currentLevel); prec_->compute(); } @@ -782,7 +782,7 @@ void Ifpack2Smoother::SetupHiptmair(L } if (smoother2 == "CHEBYSHEV") { ParameterList& list2 = paramList.sublist("hiptmair: smoother list 2"); - SetupChebyshevEigenvalues(currentLevel, "A", "EdgeMatrix ", list2); + SetupChebyshevEigenvalues(currentLevel, "NodeMatrix", "NodeMatrix ", list2); } // FIXME: Should really add some checks to make sure the eigenvalue calcs worked like in @@ -830,9 +830,10 @@ template Scalar Ifpack2Smoother::SetupChebyshevEigenvalues(Level& currentLevel, const std::string& matrixName, const std::string& label, ParameterList& paramList) const { // Helper: This gets used for smoothers that want to set up Chebyhev typedef Teuchos::ScalarTraits STS; - SC negone = -STS::one(); - RCP currentA = currentLevel.Get>(matrixName); - SC lambdaMax = negone; + SC negone = -STS::one(); + RCP currentA = currentLevel.Get>(matrixName); + RCP matA = rcp_dynamic_cast(currentA); + SC lambdaMax = negone; std::string maxEigString = "chebyshev: max eigenvalue"; std::string eigRatioString = "chebyshev: ratio eigenvalue"; @@ -844,12 +845,11 @@ Scalar Ifpack2Smoother::SetupChebyshe else lambdaMax = paramList.get(maxEigString); this->GetOStream(Statistics1) << label << maxEigString << " (cached with smoother parameter list) = " << lambdaMax << std::endl; - RCP matA = rcp_dynamic_cast(A_); if (!matA.is_null()) matA->SetMaxEigenvalueEstimate(lambdaMax); - } else { - lambdaMax = currentA->GetMaxEigenvalueEstimate(); + } else if (!matA.is_null()) { + lambdaMax = matA->GetMaxEigenvalueEstimate(); if (lambdaMax != negone) { this->GetOStream(Statistics1) << label << maxEigString << " (cached with matrix) = " << lambdaMax << std::endl; paramList.set(maxEigString, lambdaMax); @@ -871,11 +871,11 @@ Scalar Ifpack2Smoother::SetupChebyshe // ratio = max(number of fine DOFs / number of coarse DOFs, defaultValue) // // NOTE: We don't need to request previous level matrix as we know for sure it was constructed - RCP fineA = currentLevel.GetPreviousLevel()->Get>(matrixName); - size_t nRowsFine = fineA->getGlobalNumRows(); - size_t nRowsCoarse = currentA->getGlobalNumRows(); + RCP fineA = currentLevel.GetPreviousLevel()->Get>(matrixName); + size_t nRowsFine = fineA->getDomainMap()->getGlobalNumElements(); + size_t nRowsCoarse = currentA->getDomainMap()->getGlobalNumElements(); - SC levelRatio = as(as(nRowsFine) / nRowsCoarse); + SC levelRatio = as(as(nRowsFine) / nRowsCoarse); if (STS::magnitude(levelRatio) > STS::magnitude(ratio)) ratio = levelRatio; } @@ -913,8 +913,9 @@ Scalar Ifpack2Smoother::SetupChebyshe paramList.remove(paramName); } if (doScale) { + TEUCHOS_ASSERT(!matA.is_null()); const bool doReciprocal = true; - RCP lumpedDiagonal = Utilities::GetLumpedMatrixDiagonal(*currentA, doReciprocal, chebyReplaceTol, chebyReplaceVal, chebyReplaceSingleEntryRowWithZero, useAverageAbsDiagVal); + RCP lumpedDiagonal = Utilities::GetLumpedMatrixDiagonal(*matA, doReciprocal, chebyReplaceTol, chebyReplaceVal, chebyReplaceSingleEntryRowWithZero, useAverageAbsDiagVal); const Xpetra::TpetraVector& tmpVec = dynamic_cast&>(*lumpedDiagonal); paramList.set("chebyshev: operator inv diagonal", tmpVec.getTpetra_Vector()); } diff --git a/packages/muelu/src/Transfers/Matrix-Free/MueLu_MatrixFreeTentativeP_decl.hpp b/packages/muelu/src/Transfers/Matrix-Free/MueLu_MatrixFreeTentativeP_decl.hpp index df7ed5dd8ce5..81e351e3ca40 100644 --- a/packages/muelu/src/Transfers/Matrix-Free/MueLu_MatrixFreeTentativeP_decl.hpp +++ b/packages/muelu/src/Transfers/Matrix-Free/MueLu_MatrixFreeTentativeP_decl.hpp @@ -105,12 +105,12 @@ class MatrixFreeTentativeP : public Xpetra::Operator getRangeMap() const override { + const Teuchos::RCP getRangeMap() const override { return fine_map_; } // get the domain map - Teuchos::RCP getDomainMap() const override { + const Teuchos::RCP getDomainMap() const override { return coarse_map_; } diff --git a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_NullspaceFactory_kokkos_decl.hpp b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_NullspaceFactory_kokkos_decl.hpp index 895b2f31cac6..3917521af835 100644 --- a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_NullspaceFactory_kokkos_decl.hpp +++ b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_NullspaceFactory_kokkos_decl.hpp @@ -46,15 +46,7 @@ #ifndef MUELU_NULLSPACEFACTORY_KOKKOS_DECL_HPP #define MUELU_NULLSPACEFACTORY_KOKKOS_DECL_HPP -#include "MueLu_ConfigDefs.hpp" - -#include "Xpetra_MultiVector_fwd.hpp" - #include "MueLu_NullspaceFactory.hpp" -#include "MueLu_NullspaceFactory_kokkos_fwd.hpp" - -#include "MueLu_Level_fwd.hpp" -#include "MueLu_SingleLevelFactoryBase.hpp" namespace MueLu { diff --git a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_decl.hpp b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_decl.hpp index 34cc9fb29798..acfd3fe30f6b 100644 --- a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_decl.hpp +++ b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_decl.hpp @@ -49,6 +49,9 @@ #include #include "MueLu_ConfigDefs.hpp" + +#include + #include "MueLu_SaPFactory_fwd.hpp" #include "MueLu_Level_fwd.hpp" @@ -56,14 +59,13 @@ #include "MueLu_PerfUtils_fwd.hpp" #include "MueLu_PFactory.hpp" #include "MueLu_TentativePFactory_fwd.hpp" -#include "MueLu_Utilities_fwd.hpp" namespace MueLu { /*! @class SaPFactory class. - @ingroup MueLuTransferClasses @brief Factory for building Smoothed Aggregation prolongators. + @ingroup MueLuTransferClasses ## Input/output of SaPFactory ## @@ -88,14 +90,19 @@ namespace MueLu { ----------|--------------|------------ | P | SaPFactory | Smoothed prolongator - */ - template class SaPFactory : public PFactory { + public: + typedef LocalOrdinal local_ordinal_type; + typedef GlobalOrdinal global_ordinal_type; + typedef typename Node::execution_space execution_space; + typedef Node node_type; + + private: #undef MUELU_SAPFACTORY_SHORT #include "MueLu_UseShortNames.hpp" @@ -118,7 +125,7 @@ class SaPFactory : public PFactory { //! Input //@{ - void DeclareInput(Level &fineLevel, Level &coarseLevel) const; + void DeclareInput(Level& fineLevel, Level& coarseLevel) const; //@} @@ -131,26 +138,22 @@ class SaPFactory : public PFactory { Builds smoothed aggregation prolongator and returns it in coarseLevel. //FIXME what does the return code mean (unclear in MueMat)? */ - void Build(Level &fineLevel, Level &coarseLevel) const; + void Build(Level& fineLevel, Level& coarseLevel) const; - void BuildP(Level &fineLevel, Level &coarseLevel) const; // Build() + void BuildP(Level& fineLevel, Level& coarseLevel) const; - /*! - @brief Enforce constraints on prolongator + void SatisfyPConstraintsNonKokkos(RCP A, RCP& P) const; - Modifies the prolongator so that all entries lie between 0 and 1. It also - ensures that the row sum is between 0 and 1. This option only makes - sense in the SA constext if the tentative prolgonator does not use - the QR factorization. - */ - void SatisfyPConstraints(RCP A, RCP &P) const; - void optimalSatisfyPConstraintsForScalarPDEs(RCP &P) const; + void optimalSatisfyPConstraintsForScalarPDEsNonKokkos(RCP& P) const; - bool constrainRow(Scalar *orig, LocalOrdinal nEntries, Scalar leftBound, Scalar rghtBound, Scalar rsumTarget, Scalar *fixedUnsorted, Scalar *scalarData) const; + void SatisfyPConstraints(RCP A, RCP& P) const; - //@} + void optimalSatisfyPConstraintsForScalarPDEs(RCP& P) const; + + bool constrainRow(Scalar* orig, LocalOrdinal nEntries, Scalar leftBound, Scalar rghtBound, Scalar rsumTarget, Scalar* fixedUnsorted, Scalar* scalarData) const; -}; // class SaPFactory + //@} +}; } // namespace MueLu diff --git a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_def.hpp b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_def.hpp index 7a9180c7d5a5..98d9fdebfa9d 100644 --- a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_def.hpp +++ b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_def.hpp @@ -46,13 +46,12 @@ #ifndef MUELU_SAPFACTORY_DEF_HPP #define MUELU_SAPFACTORY_DEF_HPP -#include -#include // containing routines to generate Jacobi iterator -#include -#include - +#include "Kokkos_ArithTraits.hpp" #include "MueLu_SaPFactory_decl.hpp" +#include +#include + #include "MueLu_FactoryManagerBase.hpp" #include "MueLu_Level.hpp" #include "MueLu_MasterList.hpp" @@ -61,6 +60,8 @@ #include "MueLu_TentativePFactory.hpp" #include "MueLu_Utilities.hpp" +#include + namespace MueLu { template @@ -79,6 +80,7 @@ RCP SaPFactory:: SET_VALID_ENTRY("sa: rowsumabs diagonal replacement value"); SET_VALID_ENTRY("sa: rowsumabs replace single entry row with zero"); SET_VALID_ENTRY("sa: rowsumabs use automatic diagonal tolerance"); + SET_VALID_ENTRY("use kokkos refactor"); #undef SET_VALID_ENTRY validParamList->set >("A", Teuchos::null, "Generating factory of the matrix A used during the prolongator smoothing process"); @@ -93,7 +95,7 @@ RCP SaPFactory:: } template -void SaPFactory::DeclareInput(Level &fineLevel, Level &coarseLevel) const { +void SaPFactory::DeclareInput(Level& fineLevel, Level& coarseLevel) const { Input(fineLevel, "A"); // Get default tentative prolongator factory @@ -102,16 +104,16 @@ void SaPFactory::DeclareInput(Level & if (initialPFact == Teuchos::null) { initialPFact = coarseLevel.GetFactoryManager()->GetFactory("Ptent"); } - coarseLevel.DeclareInput("P", initialPFact.get(), this); // -- + coarseLevel.DeclareInput("P", initialPFact.get(), this); } template -void SaPFactory::Build(Level &fineLevel, Level &coarseLevel) const { +void SaPFactory::Build(Level& fineLevel, Level& coarseLevel) const { return BuildP(fineLevel, coarseLevel); } template -void SaPFactory::BuildP(Level &fineLevel, Level &coarseLevel) const { +void SaPFactory::BuildP(Level& fineLevel, Level& coarseLevel) const { FactoryMonitor m(*this, "Prolongator smoothing", coarseLevel); std::string levelIDs = toString(coarseLevel.GetLevelID()); @@ -128,7 +130,7 @@ void SaPFactory::BuildP(Level &fineLe if (initialPFact == Teuchos::null) { initialPFact = coarseLevel.GetFactoryManager()->GetFactory("Ptent"); } - const ParameterList &pL = GetParameterList(); + const ParameterList& pL = GetParameterList(); // Level Get RCP A = Get >(fineLevel, "A"); @@ -144,7 +146,7 @@ void SaPFactory::BuildP(Level &fineLe if (restrictionMode_) { SubFactoryMonitor m2(*this, "Transpose A", coarseLevel); - A = Utilities::Transpose(*A, true); // build transpose of A explicitely + A = Utilities::Transpose(*A, true); // build transpose of A explicitly } // Build final prolongator @@ -155,7 +157,6 @@ void SaPFactory::BuildP(Level &fineLe APparams = rcp(new ParameterList(pL.sublist("matrixmatrix: kernel params"))); else APparams = rcp(new ParameterList); - if (coarseLevel.IsAvailable("AP reuse data", this)) { GetOStream(static_cast(Runtime0 | Test)) << "Reusing previous AP data" << std::endl; @@ -168,19 +169,18 @@ void SaPFactory::BuildP(Level &fineLe APparams->set("compute global constants: temporaries", APparams->get("compute global constants: temporaries", false)); APparams->set("compute global constants", APparams->get("compute global constants", false)); - const SC dampingFactor = as(pL.get("sa: damping factor")); - const LO maxEigenIterations = as(pL.get("sa: eigenvalue estimate num iterations")); - const bool estimateMaxEigen = pL.get("sa: calculate eigenvalue estimate"); - const bool useAbsValueRowSum = pL.get("sa: use rowsumabs diagonal scaling"); - const bool doQRStep = pL.get("tentative: calculate qr"); - const bool enforceConstraints = pL.get("sa: enforce constraints"); - const MT userDefinedMaxEigen = as(pL.get("sa: max eigenvalue")); - typedef typename Teuchos::ScalarTraits::magnitudeType Magnitude; - double dTol = pL.get("sa: rowsumabs diagonal replacement tolerance"); - const Magnitude diagonalReplacementTolerance = (dTol == as(-1) ? Teuchos::ScalarTraits::eps() * 100 : as(pL.get("sa: rowsumabs diagonal replacement tolerance"))); - const SC diagonalReplacementValue = as(pL.get("sa: rowsumabs diagonal replacement value")); - const bool replaceSingleEntryRowWithZero = pL.get("sa: rowsumabs replace single entry row with zero"); - const bool useAutomaticDiagTol = pL.get("sa: rowsumabs use automatic diagonal tolerance"); + const SC dampingFactor = as(pL.get("sa: damping factor")); + const LO maxEigenIterations = as(pL.get("sa: eigenvalue estimate num iterations")); + const bool estimateMaxEigen = pL.get("sa: calculate eigenvalue estimate"); + const bool useAbsValueRowSum = pL.get("sa: use rowsumabs diagonal scaling"); + const bool doQRStep = pL.get("tentative: calculate qr"); + const bool enforceConstraints = pL.get("sa: enforce constraints"); + const MT userDefinedMaxEigen = as(pL.get("sa: max eigenvalue")); + double dTol = pL.get("sa: rowsumabs diagonal replacement tolerance"); + const MT diagonalReplacementTolerance = (dTol == as(-1) ? Teuchos::ScalarTraits::eps() * 100 : as(pL.get("sa: rowsumabs diagonal replacement tolerance"))); + const SC diagonalReplacementValue = as(pL.get("sa: rowsumabs diagonal replacement value")); + const bool replaceSingleEntryRowWithZero = pL.get("sa: rowsumabs replace single entry row with zero"); + const bool useAutomaticDiagTol = pL.get("sa: rowsumabs use automatic diagonal tolerance"); // Sanity checking TEUCHOS_TEST_FOR_EXCEPTION(doQRStep && enforceConstraints, Exceptions::RuntimeError, @@ -235,14 +235,23 @@ void SaPFactory::BuildP(Level &fineLe SC omega = dampingFactor / lambdaMax; TEUCHOS_TEST_FOR_EXCEPTION(!std::isfinite(Teuchos::ScalarTraits::magnitude(omega)), Exceptions::RuntimeError, "Prolongator damping factor needs to be finite."); - // finalP = Ptent + (I - \omega D^{-1}A) Ptent - finalP = Xpetra::IteratorOps::Jacobi(omega, *invDiag, *A, *Ptent, finalP, - GetOStream(Statistics2), std::string("MueLu::SaP-") + levelIDs, APparams); - if (enforceConstraints) { - if (A->GetFixedBlockSize() == 1) - optimalSatisfyPConstraintsForScalarPDEs(finalP); - else - SatisfyPConstraints(A, finalP); + { + SubFactoryMonitor m3(*this, "Xpetra::IteratorOps::Jacobi", coarseLevel); + // finalP = Ptent + (I - \omega D^{-1}A) Ptent + finalP = Xpetra::IteratorOps::Jacobi(omega, *invDiag, *A, *Ptent, finalP, GetOStream(Statistics2), std::string("MueLu::SaP-") + toString(coarseLevel.GetLevelID()), APparams); + if (enforceConstraints) { + if (!pL.get("use kokkos refactor")) { + if (A->GetFixedBlockSize() == 1) + optimalSatisfyPConstraintsForScalarPDEsNonKokkos(finalP); + else + SatisfyPConstraintsNonKokkos(A, finalP); + } else { + // if (A->GetFixedBlockSize() == 1) + // optimalSatisfyPConstraintsForScalarPDEs(finalP); + // else + SatisfyPConstraints(A, finalP); + } + } } } @@ -251,8 +260,9 @@ void SaPFactory::BuildP(Level &fineLe } // Level Set + RCP R; if (!restrictionMode_) { - // The factory is in prolongation mode + // prolongation factory is in prolongation mode if (!finalP.is_null()) { std::ostringstream oss; oss << "P_" << coarseLevel.GetLevelID(); @@ -267,16 +277,8 @@ void SaPFactory::BuildP(Level &fineLe if (Ptent->IsView("stridedMaps")) finalP->CreateView("stridedMaps", Ptent); - if (IsPrint(Statistics2)) { - RCP params = rcp(new ParameterList()); - params->set("printLoadBalancingInfo", true); - params->set("printCommInfo", true); - GetOStream(Statistics2) << PerfUtils::PrintMatrixInfo(*finalP, "P", params); - } - } else { - // The factory is in restriction mode - RCP R; + // prolongation factory is in restriction mode { SubFactoryMonitor m2(*this, "Transpose P", coarseLevel); R = Utilities::Transpose(*finalP, true); @@ -292,13 +294,13 @@ void SaPFactory::BuildP(Level &fineLe // NOTE: EXPERIMENTAL if (Ptent->IsView("stridedMaps")) R->CreateView("stridedMaps", Ptent, true /*transposeA*/); + } - if (IsPrint(Statistics2)) { - RCP params = rcp(new ParameterList()); - params->set("printLoadBalancingInfo", true); - params->set("printCommInfo", true); - GetOStream(Statistics2) << PerfUtils::PrintMatrixInfo(*R, "R", params); - } + if (IsPrint(Statistics2)) { + RCP params = rcp(new ParameterList()); + params->set("printLoadBalancingInfo", true); + params->set("printCommInfo", true); + GetOStream(Statistics2) << PerfUtils::PrintMatrixInfo((!restrictionMode_ ? *finalP : *R), (!restrictionMode_ ? "P" : "R"), params); } } // Build() @@ -320,7 +322,7 @@ void SaPFactory::BuildP(Level &fineLe // the constraints. template -void SaPFactory::SatisfyPConstraints(const RCP A, RCP &P) const { +void SaPFactory::SatisfyPConstraintsNonKokkos(const RCP A, RCP& P) const { const Scalar zero = Teuchos::ScalarTraits::zero(); const Scalar one = Teuchos::ScalarTraits::one(); LO nPDEs = A->GetFixedBlockSize(); @@ -339,7 +341,7 @@ void SaPFactory::SatisfyPConstraints( size_t nnz = indices.size(); if (nnz == 0) continue; - vals = ArrayView(const_cast(vals1.getRawPtr()), nnz); + vals = ArrayView(const_cast(vals1.getRawPtr()), nnz); bool checkRow = true; @@ -395,7 +397,7 @@ void SaPFactory::SatisfyPConstraints( } // SatsifyPConstraints() template -void SaPFactory::optimalSatisfyPConstraintsForScalarPDEs(RCP &P) const { +void SaPFactory::optimalSatisfyPConstraintsForScalarPDEsNonKokkos(RCP& P) const { const Scalar zero = Teuchos::ScalarTraits::zero(); const Scalar one = Teuchos::ScalarTraits::one(); @@ -410,7 +412,7 @@ void SaPFactory::optimalSatisfyPConst P->getLocalRowView((LocalOrdinal)i, indices, vals1); size_t nnz = indices.size(); if (nnz != 0) { - vals = ArrayView(const_cast(vals1.getRawPtr()), nnz); + vals = ArrayView(const_cast(vals1.getRawPtr()), nnz); Scalar rsumTarget = zero; for (size_t j = 0; j < nnz; j++) rsumTarget += vals[j]; @@ -429,7 +431,7 @@ void SaPFactory::optimalSatisfyPConst } // SatsifyPConstraints() template -bool SaPFactory::constrainRow(Scalar *orig, LocalOrdinal nEntries, Scalar leftBound, Scalar rghtBound, Scalar rsumTarget, Scalar *fixedUnsorted, Scalar *scalarData) const { +bool SaPFactory::constrainRow(Scalar* orig, LocalOrdinal nEntries, Scalar leftBound, Scalar rghtBound, Scalar rsumTarget, Scalar* fixedUnsorted, Scalar* scalarData) const { /* Input orig data that should be adjusted to satisfy bound constraints and @@ -551,7 +553,7 @@ bool SaPFactory::constrainRow(Scalar Scalar rowSumDeviation, temp, *fixedSorted, delta; Scalar closestToLeftBoundDist, closestToRghtBoundDist; LocalOrdinal closestToLeftBound, closestToRghtBound; - LocalOrdinal *inds; + LocalOrdinal* inds; bool flipped; notFlippedLeftBound = leftBound; @@ -576,7 +578,7 @@ bool SaPFactory::constrainRow(Scalar origSorted = &scalarData[0]; fixedSorted = &(scalarData[nEntries]); - inds = (LocalOrdinal *)&(scalarData[2 * nEntries]); + inds = (LocalOrdinal*)&(scalarData[2 * nEntries]); for (LocalOrdinal i = 0; i < nEntries; i++) inds[i] = i; for (LocalOrdinal i = 0; i < nEntries; i++) origSorted[i] = orig[i]; /* orig no longer used */ @@ -718,6 +720,320 @@ bool SaPFactory::constrainRow(Scalar return hasFeasibleSol; } +template +struct constraintKernel { + using Scalar = typename local_matrix_type::non_const_value_type; + using SC = Scalar; + using LO = typename local_matrix_type::non_const_ordinal_type; + using Device = typename local_matrix_type::device_type; + using KAT = Kokkos::ArithTraits; + const Scalar zero = KAT::zero(); + const Scalar one = KAT::one(); + LO nPDEs; + local_matrix_type localP; + Kokkos::View ConstraintViolationSum; + Kokkos::View Rsum; + Kokkos::View nPositive; + + constraintKernel(LO nPDEs_, local_matrix_type localP_) + : nPDEs(nPDEs_) + , localP(localP_) { + ConstraintViolationSum = Kokkos::View("ConstraintViolationSum", localP_.numRows(), nPDEs); + Rsum = Kokkos::View("Rsum", localP_.numRows(), nPDEs); + nPositive = Kokkos::View("nPositive", localP_.numRows(), nPDEs); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const size_t rowIdx) const { + auto rowPtr = localP.graph.row_map; + auto values = localP.values; + + bool checkRow = true; + + if (rowPtr(rowIdx + 1) == rowPtr(rowIdx)) checkRow = false; + + while (checkRow) { + // check constraints and compute the row sum + + for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { + Rsum(rowIdx, entryIdx % nPDEs) += values(entryIdx); + if (KAT::real(values(entryIdx)) < KAT::real(zero)) { + ConstraintViolationSum(rowIdx, entryIdx % nPDEs) += values(entryIdx); + values(entryIdx) = zero; + } else { + if (KAT::real(values(entryIdx)) != KAT::real(zero)) + nPositive(rowIdx, entryIdx % nPDEs) = nPositive(rowIdx, entryIdx % nPDEs) + 1; + + if (KAT::real(values(entryIdx)) > KAT::real(1.00001)) { + ConstraintViolationSum(rowIdx, entryIdx % nPDEs) += (values(entryIdx) - one); + values(entryIdx) = one; + } + } + } + + checkRow = false; + + // take into account any row sum that violates the contraints + + for (size_t k = 0; k < (size_t)nPDEs; k++) { + if (KAT::real(Rsum(rowIdx, k)) < KAT::magnitude(zero)) { + ConstraintViolationSum(rowIdx, k) = ConstraintViolationSum(rowIdx, k) - Rsum(rowIdx, k); // rstumin + } else if (KAT::real(Rsum(rowIdx, k)) > KAT::magnitude(1.00001)) { + ConstraintViolationSum(rowIdx, k) = ConstraintViolationSum(rowIdx, k) + (one - Rsum(rowIdx, k)); // rstumin + } + } + + // check if row need modification + for (size_t k = 0; k < (size_t)nPDEs; k++) { + if (KAT::magnitude(ConstraintViolationSum(rowIdx, k)) != KAT::magnitude(zero)) + checkRow = true; + } + // modify row + if (checkRow) { + for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { + if (KAT::real(values(entryIdx)) > KAT::real(zero)) { + values(entryIdx) = values(entryIdx) + + (ConstraintViolationSum(rowIdx, entryIdx % nPDEs) / (Scalar(nPositive(rowIdx, entryIdx % nPDEs)) != zero ? Scalar(nPositive(rowIdx, entryIdx % nPDEs)) : one)); + } + } + for (size_t k = 0; k < (size_t)nPDEs; k++) ConstraintViolationSum(rowIdx, k) = zero; + } + for (size_t k = 0; k < (size_t)nPDEs; k++) Rsum(rowIdx, k) = zero; + for (size_t k = 0; k < (size_t)nPDEs; k++) nPositive(rowIdx, k) = 0; + } // while (checkRow) ... + } +}; + +template +struct optimalSatisfyConstraintsForScalarPDEsKernel { + using Scalar = typename local_matrix_type::non_const_value_type; + using SC = Scalar; + using LO = typename local_matrix_type::non_const_ordinal_type; + using Device = typename local_matrix_type::device_type; + using KAT = Kokkos::ArithTraits; + const Scalar zero = KAT::zero(); + const Scalar one = KAT::one(); + LO nPDEs; + local_matrix_type localP; + Kokkos::View origSorted; + Kokkos::View fixedSorted; + Kokkos::View inds; + + optimalSatisfyConstraintsForScalarPDEsKernel(LO nPDEs_, LO maxRowEntries_, local_matrix_type localP_) + : nPDEs(nPDEs_) + , localP(localP_) { + origSorted = Kokkos::View("origSorted", localP_.numRows(), maxRowEntries_); + fixedSorted = Kokkos::View("fixedSorted", localP_.numRows(), maxRowEntries_); + inds = Kokkos::View("inds", localP_.numRows(), maxRowEntries_); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const size_t rowIdx) const { + auto rowPtr = localP.graph.row_map; + auto values = localP.values; + + auto nnz = rowPtr(rowIdx + 1) - rowPtr(rowIdx); + + if (nnz != 0) { + Scalar rsumTarget = zero; + for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) rsumTarget += values(entryIdx); + + { + SC aBigNumber; + SC rowSumDeviation, temp, delta; + SC closestToLeftBoundDist, closestToRghtBoundDist; + LO closestToLeftBound, closestToRghtBound; + bool flipped; + + SC leftBound = zero; + SC rghtBound = one; + if ((KAT::real(rsumTarget) >= KAT::real(leftBound * (static_cast(nnz)))) && + (KAT::real(rsumTarget) <= KAT::real(rghtBound * (static_cast(nnz))))) { // has Feasible solution + + flipped = false; + // compute aBigNumber to handle some corner cases where we need + // something large so that an if statement will be false + aBigNumber = KAT::zero(); + for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { + if (KAT::magnitude(values(entryIdx)) > KAT::magnitude(aBigNumber)) + aBigNumber = KAT::magnitude(values(entryIdx)); + } + aBigNumber = aBigNumber + (KAT::magnitude(leftBound) + KAT::magnitude(rghtBound)) * (100 * one); + + LO ind = 0; + for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { + origSorted(rowIdx, ind) = values(entryIdx); + inds(rowIdx, ind) = ind; + ind++; + } + + auto sortVals = Kokkos::subview(origSorted, rowIdx, Kokkos::ALL()); + auto sortInds = Kokkos::subview(inds, rowIdx, Kokkos::make_pair(0, ind)); + // Need permutation indices to sort row values from smallest to largest, + // and unsort once row constraints are applied. + // serial insertion sort workaround from https://github.com/kokkos/kokkos/issues/645 + for (LO i = 1; i < static_cast(nnz); ++i) { + ind = sortInds(i); + LO j = i; + + if (KAT::real(sortVals(sortInds(i))) < KAT::real(sortVals(sortInds(0)))) { + for (; j > 0; --j) sortInds(j) = sortInds(j - 1); + + sortInds(0) = ind; + } else { + for (; KAT::real(sortVals(ind)) < KAT::real(sortVals(sortInds(j - 1))); --j) sortInds(j) = sortInds(j - 1); + + sortInds(j) = ind; + } + } + + for (LO i = 0; i < static_cast(nnz); i++) origSorted(rowIdx, i) = values(rowPtr(rowIdx) + inds(rowIdx, i)); // values is no longer used + // find entry in origSorted just to the right of the leftBound + closestToLeftBound = 0; + while ((closestToLeftBound < static_cast(nnz)) && (KAT::real(origSorted(rowIdx, closestToLeftBound)) <= KAT::real(leftBound))) closestToLeftBound++; + + // find entry in origSorted just to the right of the rghtBound + closestToRghtBound = closestToLeftBound; + while ((closestToRghtBound < static_cast(nnz)) && (KAT::real(origSorted(rowIdx, closestToRghtBound)) <= KAT::real(rghtBound))) closestToRghtBound++; + + // compute distance between closestToLeftBound and the left bound and the + // distance between closestToRghtBound and the right bound. + + closestToLeftBoundDist = origSorted(rowIdx, closestToLeftBound) - leftBound; + if (closestToRghtBound == static_cast(nnz)) + closestToRghtBoundDist = aBigNumber; + else + closestToRghtBoundDist = origSorted(rowIdx, closestToRghtBound) - rghtBound; + + // compute how far the rowSum is off from the target row sum taking into account + // numbers that have been shifted to satisfy bound constraint + + rowSumDeviation = leftBound * (static_cast(closestToLeftBound)) + (static_cast(nnz - closestToRghtBound)) * rghtBound - rsumTarget; + for (LO i = closestToLeftBound; i < closestToRghtBound; i++) rowSumDeviation += origSorted(rowIdx, i); + + // the code that follow after this if statement assumes that rowSumDeviation is positive. If this + // is not the case, flip the signs of everything so that rowSumDeviation is now positive. + // Later we will flip the data back to its original form. + if (KAT::real(rowSumDeviation) < KAT::real(KAT::zero())) { + flipped = true; + temp = leftBound; + leftBound = -rghtBound; + rghtBound = temp; + + /* flip sign of origSorted and reverse ordering so that the negative version is sorted */ + + // TODO: the following is bad for GPU performance. Switch to bit shifting if brave. + if ((nnz % 2) == 1) origSorted(rowIdx, (nnz / 2)) = -origSorted(rowIdx, (nnz / 2)); + for (LO i = 0; i < static_cast(nnz / 2); i++) { + temp = origSorted(rowIdx, i); + origSorted(rowIdx, i) = -origSorted(rowIdx, nnz - 1 - i); + origSorted(rowIdx, nnz - i - 1) = -temp; + } + + /* reverse bounds */ + + LO itemp = closestToLeftBound; + closestToLeftBound = nnz - closestToRghtBound; + closestToRghtBound = nnz - itemp; + closestToLeftBoundDist = origSorted(rowIdx, closestToLeftBound) - leftBound; + if (closestToRghtBound == static_cast(nnz)) + closestToRghtBoundDist = aBigNumber; + else + closestToRghtBoundDist = origSorted(rowIdx, closestToRghtBound) - rghtBound; + + rowSumDeviation = -rowSumDeviation; + } + + // initial fixedSorted so bounds are satisfied and interiors correspond to origSorted + + for (LO i = 0; i < closestToLeftBound; i++) fixedSorted(rowIdx, i) = leftBound; + for (LO i = closestToLeftBound; i < closestToRghtBound; i++) fixedSorted(rowIdx, i) = origSorted(rowIdx, i); + for (LO i = closestToRghtBound; i < static_cast(nnz); i++) fixedSorted(rowIdx, i) = rghtBound; + + while ((KAT::magnitude(rowSumDeviation) > KAT::magnitude((one * 1.e-10) * rsumTarget))) { // && ( (closestToLeftBound < nEntries ) || (closestToRghtBound < nEntries))) { + if (closestToRghtBound != closestToLeftBound) + delta = rowSumDeviation / static_cast(closestToRghtBound - closestToLeftBound); + else + delta = aBigNumber; + + if (KAT::magnitude(closestToLeftBoundDist) <= KAT::magnitude(closestToRghtBoundDist)) { + if (KAT::magnitude(delta) <= KAT::magnitude(closestToLeftBoundDist)) { + rowSumDeviation = zero; + for (LO i = closestToLeftBound; i < closestToRghtBound; i++) fixedSorted(rowIdx, i) = origSorted(rowIdx, i) - delta; + } else { + rowSumDeviation = rowSumDeviation - closestToLeftBoundDist; + fixedSorted(rowIdx, closestToLeftBound) = leftBound; + closestToLeftBound++; + if (closestToLeftBound < static_cast(nnz)) + closestToLeftBoundDist = origSorted(rowIdx, closestToLeftBound) - leftBound; + else + closestToLeftBoundDist = aBigNumber; + } + } else { + if (KAT::magnitude(delta) <= KAT::magnitude(closestToRghtBoundDist)) { + rowSumDeviation = 0; + for (LO i = closestToLeftBound; i < closestToRghtBound; i++) fixedSorted(rowIdx, i) = origSorted(rowIdx, i) - delta; + } else { + rowSumDeviation = rowSumDeviation + closestToRghtBoundDist; + // if (closestToRghtBound < nEntries) { + fixedSorted(rowIdx, closestToRghtBound) = origSorted(rowIdx, closestToRghtBound); + closestToRghtBound++; + // } + if (closestToRghtBound >= static_cast(nnz)) + closestToRghtBoundDist = aBigNumber; + else + closestToRghtBoundDist = origSorted(rowIdx, closestToRghtBound) - rghtBound; + } + } + } + + auto rowStart = rowPtr(rowIdx); + if (flipped) { + /* flip sign of fixedSorted and reverse ordering so that the positve version is sorted */ + + if ((nnz % 2) == 1) fixedSorted(rowIdx, (nnz / 2)) = -fixedSorted(rowIdx, (nnz / 2)); + for (LO i = 0; i < static_cast(nnz / 2); i++) { + temp = fixedSorted(rowIdx, i); + fixedSorted(rowIdx, i) = -fixedSorted(rowIdx, nnz - 1 - i); + fixedSorted(rowIdx, nnz - i - 1) = -temp; + } + } + // unsort and update row values with new values + for (LO i = 0; i < static_cast(nnz); i++) values(rowStart + inds(rowIdx, i)) = fixedSorted(rowIdx, i); + + } else { // row does not have feasible solution to match constraint + // just set all entries to the same value giving a row sum of 1 + for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) values(entryIdx) = one / (static_cast(nnz)); + } + } + } + } +}; + +template +void SaPFactory::SatisfyPConstraints(const RCP A, RCP& P) const { + using Device = typename Matrix::local_matrix_type::device_type; + LO nPDEs = A->GetFixedBlockSize(); + + using local_mat_type = typename Matrix::local_matrix_type; + constraintKernel myKernel(nPDEs, P->getLocalMatrixDevice()); + Kokkos::parallel_for("enforce constraint", Kokkos::RangePolicy(0, P->getRowMap()->getLocalNumElements()), + myKernel); + +} // SatsifyPConstraints() + +template +void SaPFactory::optimalSatisfyPConstraintsForScalarPDEs(RCP& P) const { + using Device = typename Matrix::local_matrix_type::device_type; + LO nPDEs = 1; // A->GetFixedBlockSize(); + + using local_mat_type = typename Matrix::local_matrix_type; + optimalSatisfyConstraintsForScalarPDEsKernel myKernel(nPDEs, P->getLocalMaxNumRowEntries(), P->getLocalMatrixDevice()); + Kokkos::parallel_for("enforce constraint", Kokkos::RangePolicy(0, P->getLocalNumRows()), + myKernel); + +} // SatsifyPConstraints() + } // namespace MueLu #endif // MUELU_SAPFACTORY_DEF_HPP diff --git a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_decl.hpp b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_decl.hpp index fd39a627bed6..568cf1fa386b 100644 --- a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_decl.hpp +++ b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_decl.hpp @@ -46,105 +46,12 @@ #ifndef MUELU_SAPFACTORY_KOKKOS_DECL_HPP #define MUELU_SAPFACTORY_KOKKOS_DECL_HPP -#include - -#include "MueLu_ConfigDefs.hpp" - -#include - -#include "MueLu_SaPFactory_kokkos_fwd.hpp" - -#include "MueLu_Level_fwd.hpp" -#include "MueLu_ParameterListAcceptor.hpp" -#include "MueLu_PerfUtils_fwd.hpp" -#include "MueLu_PFactory.hpp" -#include "MueLu_TentativePFactory_fwd.hpp" +#include "MueLu_SaPFactory.hpp" namespace MueLu { -/*! - @class SaPFactory_kokkos class. - @brief Factory for building Smoothed Aggregation prolongators. - @ingroup MueLuTransferClasses - - ## Input/output of SaPFactory_kokkos ## - - ### User parameters of SaPFactory_kokkos ### - Parameter | type | default | master.xml | validated | requested | description - ----------|------|---------|:----------:|:---------:|:---------:|------------ - | sa: damping factor | double | 1.33 | * | * | | Damping factor for smoothed aggregation transfer operators | - | sa: calculate eigenvalue estimate | bool | false | * | * | | Force calculation of eigenvalue estimate during prolongator smoothing | - | sa: eigenvalue estimate num iterations | int | 10 | * | * | | Number of power iterations to estimate max eigenvalue | - | A | Factory | null | | * | * | Generating factory of the matrix A used during the prolongator smoothing process | - | P | Factory | null | | * | * | Tentative prolongator factory (should be a TentativePFactory object). Note that if "P" is not provided the FactoryManager tries the factory which is generating the variable "Ptent" as input for "P". In the standard case using the default settings this is the non-smoothed tentative prolongation operator. | - - The * in the @c master.xml column denotes that the parameter is defined in the @c master.xml file.
- The * in the @c validated column means that the parameter is declared in the list of valid input parameters (see SaPFactory_kokkos::GetValidParameters).
- The * in the @c requested column states that the data is requested as input with all dependencies (see SaPFactory_kokkos::DeclareInput). - - ### Variables provided by SaPFactory_kokkos ### - - After SaPFactory_kokkos::Build the following data is available (if requested) - - Parameter | generated by | description - ----------|--------------|------------ - | P | SaPFactory_kokkos | Smoothed prolongator - -*/ template -class SaPFactory_kokkos : public PFactory { - public: - typedef LocalOrdinal local_ordinal_type; - typedef GlobalOrdinal global_ordinal_type; - typedef typename Node::execution_space execution_space; - typedef Node node_type; - - private: -#undef MUELU_SAPFACTORY_KOKKOS_SHORT -#include "MueLu_UseShortNames.hpp" - - public: - //! @name Constructors/Destructors. - //@{ - - /*! @brief Constructor. - User can supply a factory for generating the tentative prolongator. - */ - SaPFactory_kokkos() {} - - //! Destructor. - virtual ~SaPFactory_kokkos() {} - - RCP GetValidParameterList() const; - - //@} - - //! Input - //@{ - - void DeclareInput(Level& fineLevel, Level& coarseLevel) const; - - //@} - - //! @name Build methods. - //@{ - - /*! - @brief Build method. - - Builds smoothed aggregation prolongator and returns it in coarseLevel. - //FIXME what does the return code mean (unclear in MueMat)? - */ - void Build(Level& fineLevel, Level& coarseLevel) const; - - void BuildP(Level& fineLevel, Level& coarseLevel) const; - - void SatisfyPConstraints(RCP A, RCP& P) const; - - void optimalSatisfyPConstraintsForScalarPDEs(RCP& P) const; - - //@} -}; +class [[deprecated]] SaPFactory_kokkos : public SaPFactory {}; } // namespace MueLu diff --git a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_def.hpp b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_def.hpp index 08a4a168e8d1..1b1e70c91e47 100644 --- a/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_def.hpp +++ b/packages/muelu/src/Transfers/Smoothed-Aggregation/MueLu_SaPFactory_kokkos_def.hpp @@ -46,553 +46,6 @@ #ifndef MUELU_SAPFACTORY_KOKKOS_DEF_HPP #define MUELU_SAPFACTORY_KOKKOS_DEF_HPP -#ifdef out -#include "KokkosKernels_Handle.hpp" -#include "KokkosSparse_spgemm.hpp" -#include "KokkosSparse_spmv.hpp" -#endif #include "MueLu_SaPFactory_kokkos_decl.hpp" -#include -#include - -#include "MueLu_FactoryManagerBase.hpp" -#include "MueLu_Level.hpp" -#include "MueLu_MasterList.hpp" -#include "MueLu_Monitor.hpp" -#include "MueLu_PerfUtils.hpp" -#include "MueLu_TentativePFactory.hpp" -#include "MueLu_Utilities.hpp" - -#include - -namespace MueLu { - -template -RCP SaPFactory_kokkos::GetValidParameterList() const { - RCP validParamList = rcp(new ParameterList()); - -#define SET_VALID_ENTRY(name) validParamList->setEntry(name, MasterList::getEntry(name)) - SET_VALID_ENTRY("sa: damping factor"); - SET_VALID_ENTRY("sa: calculate eigenvalue estimate"); - SET_VALID_ENTRY("sa: eigenvalue estimate num iterations"); - SET_VALID_ENTRY("sa: use rowsumabs diagonal scaling"); - SET_VALID_ENTRY("sa: enforce constraints"); - SET_VALID_ENTRY("tentative: calculate qr"); - SET_VALID_ENTRY("sa: max eigenvalue"); -#undef SET_VALID_ENTRY - - validParamList->set>("A", Teuchos::null, "Generating factory of the matrix A used during the prolongator smoothing process"); - validParamList->set>("P", Teuchos::null, "Tentative prolongator factory"); - - // Make sure we don't recursively validate options for the matrixmatrix kernels - ParameterList norecurse; - norecurse.disableRecursiveValidation(); - validParamList->set("matrixmatrix: kernel params", norecurse, "MatrixMatrix kernel parameters"); - - return validParamList; -} - -template -void SaPFactory_kokkos::DeclareInput(Level& fineLevel, Level& coarseLevel) const { - Input(fineLevel, "A"); - - // Get default tentative prolongator factory - // Getting it that way ensure that the same factory instance will be used for both SaPFactory_kokkos and NullspaceFactory. - RCP initialPFact = GetFactory("P"); - if (initialPFact == Teuchos::null) { - initialPFact = coarseLevel.GetFactoryManager()->GetFactory("Ptent"); - } - coarseLevel.DeclareInput("P", initialPFact.get(), this); -} - -template -void SaPFactory_kokkos::Build(Level& fineLevel, Level& coarseLevel) const { - return BuildP(fineLevel, coarseLevel); -} - -template -void SaPFactory_kokkos::BuildP(Level& fineLevel, Level& coarseLevel) const { - FactoryMonitor m(*this, "Prolongator smoothing", coarseLevel); - - typedef typename Teuchos::ScalarTraits::magnitudeType Magnitude; - - // Get default tentative prolongator factory - // Getting it that way ensure that the same factory instance will be used for both SaPFactory_kokkos and NullspaceFactory. - // -- Warning: Do not use directly initialPFact_. Use initialPFact instead everywhere! - RCP initialPFact = GetFactory("P"); - if (initialPFact == Teuchos::null) { - initialPFact = coarseLevel.GetFactoryManager()->GetFactory("Ptent"); - } - const ParameterList& pL = GetParameterList(); - - // Level Get - RCP A = Get>(fineLevel, "A"); - RCP Ptent = coarseLevel.Get>("P", initialPFact.get()); - RCP finalP; - // If Tentative facctory bailed out (e.g., number of global aggregates is 0), then SaPFactory bails - // This level will ultimately be removed in MueLu_Hierarchy_defs.h via a resize() - if (Ptent == Teuchos::null) { - finalP = Teuchos::null; - Set(coarseLevel, "P", finalP); - return; - } - - if (restrictionMode_) { - SubFactoryMonitor m2(*this, "Transpose A", coarseLevel); - - A = Utilities::Transpose(*A, true); // build transpose of A explicitly - } - - // Build final prolongator - - // Reuse pattern if available - RCP APparams; - if (pL.isSublist("matrixmatrix: kernel params")) - APparams = rcp(new ParameterList(pL.sublist("matrixmatrix: kernel params"))); - else - APparams = rcp(new ParameterList); - if (coarseLevel.IsAvailable("AP reuse data", this)) { - GetOStream(static_cast(Runtime0 | Test)) << "Reusing previous AP data" << std::endl; - - APparams = coarseLevel.Get>("AP reuse data", this); - - if (APparams->isParameter("graph")) - finalP = APparams->get>("graph"); - } - // By default, we don't need global constants for SaP - APparams->set("compute global constants: temporaries", APparams->get("compute global constants: temporaries", false)); - APparams->set("compute global constants", APparams->get("compute global constants", false)); - - const SC dampingFactor = as(pL.get("sa: damping factor")); - const LO maxEigenIterations = as(pL.get("sa: eigenvalue estimate num iterations")); - const bool estimateMaxEigen = pL.get("sa: calculate eigenvalue estimate"); - const bool useAbsValueRowSum = pL.get("sa: use rowsumabs diagonal scaling"); - const bool doQRStep = pL.get("tentative: calculate qr"); - const bool enforceConstraints = pL.get("sa: enforce constraints"); - const SC userDefinedMaxEigen = as(pL.get("sa: max eigenvalue")); - - // Sanity checking - TEUCHOS_TEST_FOR_EXCEPTION(doQRStep && enforceConstraints, Exceptions::RuntimeError, - "MueLu::TentativePFactory::MakeTentative: cannot use 'enforce constraints' and 'calculate qr' at the same time"); - - if (dampingFactor != Teuchos::ScalarTraits::zero()) { - SC lambdaMax; - RCP invDiag; - if (Teuchos::ScalarTraits::real(userDefinedMaxEigen) == Teuchos::ScalarTraits::real(-1.0)) { - SubFactoryMonitor m2(*this, "Eigenvalue estimate", coarseLevel); - lambdaMax = A->GetMaxEigenvalueEstimate(); - if (lambdaMax == -Teuchos::ScalarTraits::one() || estimateMaxEigen) { - GetOStream(Statistics1) << "Calculating max eigenvalue estimate now (max iters = " << maxEigenIterations << ((useAbsValueRowSum) ? ", use rowSumAbs diagonal)" : ", use point diagonal)") << std::endl; - Magnitude stopTol = 1e-4; - invDiag = Utilities::GetMatrixDiagonalInverse(*A, Teuchos::ScalarTraits::eps() * 100, Teuchos::ScalarTraits::zero(), useAbsValueRowSum); - if (useAbsValueRowSum) - lambdaMax = Utilities::PowerMethod(*A, invDiag, maxEigenIterations, stopTol); - else - lambdaMax = Utilities::PowerMethod(*A, true, maxEigenIterations, stopTol); - A->SetMaxEigenvalueEstimate(lambdaMax); - } else { - GetOStream(Statistics1) << "Using cached max eigenvalue estimate" << std::endl; - } - } else { - lambdaMax = userDefinedMaxEigen; - A->SetMaxEigenvalueEstimate(lambdaMax); - } - GetOStream(Statistics0) << "Prolongator damping factor = " << dampingFactor / lambdaMax << " (" << dampingFactor << " / " << lambdaMax << ")" << std::endl; - - { - SubFactoryMonitor m2(*this, "Fused (I-omega*D^{-1} A)*Ptent", coarseLevel); - { - SubFactoryMonitor m3(*this, "Diagonal Extraction", coarseLevel); - if (useAbsValueRowSum) - GetOStream(Runtime0) << "Using rowSumAbs diagonal" << std::endl; - if (invDiag == Teuchos::null) - invDiag = Utilities::GetMatrixDiagonalInverse(*A, Teuchos::ScalarTraits::eps() * 100, Teuchos::ScalarTraits::zero(), useAbsValueRowSum); - } - SC omega = dampingFactor / lambdaMax; - TEUCHOS_TEST_FOR_EXCEPTION(!std::isfinite(Teuchos::ScalarTraits::magnitude(omega)), Exceptions::RuntimeError, "Prolongator damping factor needs to be finite."); - - { - SubFactoryMonitor m3(*this, "Xpetra::IteratorOps::Jacobi", coarseLevel); - // finalP = Ptent + (I - \omega D^{-1}A) Ptent - finalP = Xpetra::IteratorOps::Jacobi(omega, *invDiag, *A, *Ptent, finalP, GetOStream(Statistics2), std::string("MueLu::SaP-") + toString(coarseLevel.GetLevelID()), APparams); - if (enforceConstraints) SatisfyPConstraints(A, finalP); - } - } - - } else { - finalP = Ptent; - } - - // Level Set - if (!restrictionMode_) { - // prolongation factory is in prolongation mode - if (!finalP.is_null()) { - std::ostringstream oss; - oss << "P_" << coarseLevel.GetLevelID(); - finalP->setObjectLabel(oss.str()); - } - Set(coarseLevel, "P", finalP); - - // NOTE: EXPERIMENTAL - if (Ptent->IsView("stridedMaps")) - finalP->CreateView("stridedMaps", Ptent); - - } else { - // prolongation factory is in restriction mode - RCP R = Utilities::Transpose(*finalP, true); - Set(coarseLevel, "R", R); - if (!R.is_null()) { - std::ostringstream oss; - oss << "R_" << coarseLevel.GetLevelID(); - R->setObjectLabel(oss.str()); - } - - // NOTE: EXPERIMENTAL - if (Ptent->IsView("stridedMaps")) - R->CreateView("stridedMaps", Ptent, true); - } - - if (IsPrint(Statistics2)) { - RCP params = rcp(new ParameterList()); - params->set("printLoadBalancingInfo", true); - params->set("printCommInfo", true); - GetOStream(Statistics2) << PerfUtils::PrintMatrixInfo(*finalP, (!restrictionMode_ ? "P" : "R"), params); - } - -} // Build() - -// Analyze the grid transfer produced by smoothed aggregation and make -// modifications if it does not look right. In particular, if there are -// negative entries or entries larger than 1, modify P's rows. -// -// Note: this kind of evaluation probably only makes sense if not doing QR -// when constructing tentative P. -// -// For entries that do not satisfy the two constraints (>= 0 or <=1) we set -// these entries to the constraint value and modify the rest of the row -// so that the row sum remains the same as before by adding an equal -// amount to each remaining entry. However, if the original row sum value -// violates the constraints, we set the row sum back to 1 (the row sum of -// tentative P). After doing the modification to a row, we need to check -// again the entire row to make sure that the modified row does not violate -// the constraints. - -template -struct constraintKernel { - using Scalar = typename local_matrix_type::non_const_value_type; - using SC = Scalar; - using LO = typename local_matrix_type::non_const_ordinal_type; - using Device = typename local_matrix_type::device_type; - const Scalar zero = Kokkos::ArithTraits::zero(); - const Scalar one = Kokkos::ArithTraits::one(); - LO nPDEs; - local_matrix_type localP; - Kokkos::View ConstraintViolationSum; - Kokkos::View Rsum; - Kokkos::View nPositive; - - constraintKernel(LO nPDEs_, local_matrix_type localP_) - : nPDEs(nPDEs_) - , localP(localP_) { - ConstraintViolationSum = Kokkos::View("ConstraintViolationSum", localP_.numRows(), nPDEs); - Rsum = Kokkos::View("Rsum", localP_.numRows(), nPDEs); - nPositive = Kokkos::View("nPositive", localP_.numRows(), nPDEs); - } - - KOKKOS_INLINE_FUNCTION - void operator()(const size_t rowIdx) const { - auto rowPtr = localP.graph.row_map; - auto values = localP.values; - - bool checkRow = true; - - if (rowPtr(rowIdx + 1) == rowPtr(rowIdx)) checkRow = false; - - while (checkRow) { - // check constraints and compute the row sum - - for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { - Rsum(rowIdx, entryIdx % nPDEs) += values(entryIdx); - if (Kokkos::ArithTraits::real(values(entryIdx)) < Kokkos::ArithTraits::real(zero)) { - ConstraintViolationSum(rowIdx, entryIdx % nPDEs) += values(entryIdx); - values(entryIdx) = zero; - } else { - if (Kokkos::ArithTraits::real(values(entryIdx)) != Kokkos::ArithTraits::real(zero)) - nPositive(rowIdx, entryIdx % nPDEs) = nPositive(rowIdx, entryIdx % nPDEs) + 1; - - if (Kokkos::ArithTraits::real(values(entryIdx)) > Kokkos::ArithTraits::real(1.00001)) { - ConstraintViolationSum(rowIdx, entryIdx % nPDEs) += (values(entryIdx) - one); - values(entryIdx) = one; - } - } - } - - checkRow = false; - - // take into account any row sum that violates the contraints - - for (size_t k = 0; k < (size_t)nPDEs; k++) { - if (Kokkos::ArithTraits::real(Rsum(rowIdx, k)) < Kokkos::ArithTraits::magnitude(zero)) { - ConstraintViolationSum(rowIdx, k) = ConstraintViolationSum(rowIdx, k) - Rsum(rowIdx, k); // rstumin - } else if (Kokkos::ArithTraits::real(Rsum(rowIdx, k)) > Kokkos::ArithTraits::magnitude(1.00001)) { - ConstraintViolationSum(rowIdx, k) = ConstraintViolationSum(rowIdx, k) + (one - Rsum(rowIdx, k)); // rstumin - } - } - - // check if row need modification - for (size_t k = 0; k < (size_t)nPDEs; k++) { - if (Kokkos::ArithTraits::magnitude(ConstraintViolationSum(rowIdx, k)) != Kokkos::ArithTraits::magnitude(zero)) - checkRow = true; - } - // modify row - if (checkRow) { - for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { - if (Kokkos::ArithTraits::real(values(entryIdx)) > Kokkos::ArithTraits::real(zero)) { - values(entryIdx) = values(entryIdx) + - (ConstraintViolationSum(rowIdx, entryIdx % nPDEs) / (Scalar(nPositive(rowIdx, entryIdx % nPDEs)) != zero ? Scalar(nPositive(rowIdx, entryIdx % nPDEs)) : one)); - } - } - for (size_t k = 0; k < (size_t)nPDEs; k++) ConstraintViolationSum(rowIdx, k) = zero; - } - for (size_t k = 0; k < (size_t)nPDEs; k++) Rsum(rowIdx, k) = zero; - for (size_t k = 0; k < (size_t)nPDEs; k++) nPositive(rowIdx, k) = 0; - } // while (checkRow) ... - } -}; - -template -struct optimalSatisfyConstraintsForScalarPDEsKernel { - using Scalar = typename local_matrix_type::non_const_value_type; - using SC = Scalar; - using LO = typename local_matrix_type::non_const_ordinal_type; - using Device = typename local_matrix_type::device_type; - using KAT = Kokkos::ArithTraits; - const Scalar zero = Kokkos::ArithTraits::zero(); - const Scalar one = Kokkos::ArithTraits::one(); - LO nPDEs; - local_matrix_type localP; - Kokkos::View origSorted; - Kokkos::View fixedSorted; - Kokkos::View inds; - - optimalSatisfyConstraintsForScalarPDEsKernel(LO nPDEs_, LO maxRowEntries_, local_matrix_type localP_) - : nPDEs(nPDEs_) - , localP(localP_) { - origSorted = Kokkos::View("origSorted", localP_.numRows(), maxRowEntries_); - fixedSorted = Kokkos::View("fixedSorted", localP_.numRows(), maxRowEntries_); - inds = Kokkos::View("inds", localP_.numRows(), maxRowEntries_); - } - - KOKKOS_INLINE_FUNCTION - void operator()(const size_t rowIdx) const { - auto rowPtr = localP.graph.row_map; - auto values = localP.values; - - auto nnz = rowPtr(rowIdx + 1) - rowPtr(rowIdx); - - if (nnz != 0) { - Scalar rsumTarget = zero; - for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) rsumTarget += values(entryIdx); - - { - SC aBigNumber; - SC rowSumDeviation, temp, delta; - SC closestToLeftBoundDist, closestToRghtBoundDist; - LO closestToLeftBound, closestToRghtBound; - bool flipped; - - SC leftBound = zero; - SC rghtBound = one; - if ((KAT::real(rsumTarget) >= KAT::real(leftBound * (static_cast(nnz)))) && - (KAT::real(rsumTarget) <= KAT::real(rghtBound * (static_cast(nnz))))) { // has Feasible solution - - flipped = false; - // compute aBigNumber to handle some corner cases where we need - // something large so that an if statement will be false - aBigNumber = KAT::zero(); - for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { - if (KAT::magnitude(values(entryIdx)) > KAT::magnitude(aBigNumber)) - aBigNumber = KAT::magnitude(values(entryIdx)); - } - aBigNumber = aBigNumber + (KAT::magnitude(leftBound) + KAT::magnitude(rghtBound)) * (100 * one); - - LO ind = 0; - for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) { - origSorted(rowIdx, ind) = values(entryIdx); - inds(rowIdx, ind) = ind; - ind++; - } - - auto sortVals = Kokkos::subview(origSorted, rowIdx, Kokkos::ALL()); - auto sortInds = Kokkos::subview(inds, rowIdx, Kokkos::make_pair(0, ind)); - // Need permutation indices to sort row values from smallest to largest, - // and unsort once row constraints are applied. - // serial insertion sort workaround from https://github.com/kokkos/kokkos/issues/645 - for (LO i = 1; i < static_cast(nnz); ++i) { - ind = sortInds(i); - LO j = i; - - if (KAT::real(sortVals(sortInds(i))) < KAT::real(sortVals(sortInds(0)))) { - for (; j > 0; --j) sortInds(j) = sortInds(j - 1); - - sortInds(0) = ind; - } else { - for (; KAT::real(sortVals(ind)) < KAT::real(sortVals(sortInds(j - 1))); --j) sortInds(j) = sortInds(j - 1); - - sortInds(j) = ind; - } - } - - for (LO i = 0; i < static_cast(nnz); i++) origSorted(rowIdx, i) = values(rowPtr(rowIdx) + inds(rowIdx, i)); // values is no longer used - // find entry in origSorted just to the right of the leftBound - closestToLeftBound = 0; - while ((closestToLeftBound < static_cast(nnz)) && (KAT::real(origSorted(rowIdx, closestToLeftBound)) <= KAT::real(leftBound))) closestToLeftBound++; - - // find entry in origSorted just to the right of the rghtBound - closestToRghtBound = closestToLeftBound; - while ((closestToRghtBound < static_cast(nnz)) && (KAT::real(origSorted(rowIdx, closestToRghtBound)) <= KAT::real(rghtBound))) closestToRghtBound++; - - // compute distance between closestToLeftBound and the left bound and the - // distance between closestToRghtBound and the right bound. - - closestToLeftBoundDist = origSorted(rowIdx, closestToLeftBound) - leftBound; - if (closestToRghtBound == static_cast(nnz)) - closestToRghtBoundDist = aBigNumber; - else - closestToRghtBoundDist = origSorted(rowIdx, closestToRghtBound) - rghtBound; - - // compute how far the rowSum is off from the target row sum taking into account - // numbers that have been shifted to satisfy bound constraint - - rowSumDeviation = leftBound * (static_cast(closestToLeftBound)) + (static_cast(nnz - closestToRghtBound)) * rghtBound - rsumTarget; - for (LO i = closestToLeftBound; i < closestToRghtBound; i++) rowSumDeviation += origSorted(rowIdx, i); - - // the code that follow after this if statement assumes that rowSumDeviation is positive. If this - // is not the case, flip the signs of everything so that rowSumDeviation is now positive. - // Later we will flip the data back to its original form. - if (KAT::real(rowSumDeviation) < KAT::real(KAT::zero())) { - flipped = true; - temp = leftBound; - leftBound = -rghtBound; - rghtBound = temp; - - /* flip sign of origSorted and reverse ordering so that the negative version is sorted */ - - // TODO: the following is bad for GPU performance. Switch to bit shifting if brave. - if ((nnz % 2) == 1) origSorted(rowIdx, (nnz / 2)) = -origSorted(rowIdx, (nnz / 2)); - for (LO i = 0; i < static_cast(nnz / 2); i++) { - temp = origSorted(rowIdx, i); - origSorted(rowIdx, i) = -origSorted(rowIdx, nnz - 1 - i); - origSorted(rowIdx, nnz - i - 1) = -temp; - } - - /* reverse bounds */ - - LO itemp = closestToLeftBound; - closestToLeftBound = nnz - closestToRghtBound; - closestToRghtBound = nnz - itemp; - closestToLeftBoundDist = origSorted(rowIdx, closestToLeftBound) - leftBound; - if (closestToRghtBound == static_cast(nnz)) - closestToRghtBoundDist = aBigNumber; - else - closestToRghtBoundDist = origSorted(rowIdx, closestToRghtBound) - rghtBound; - - rowSumDeviation = -rowSumDeviation; - } - - // initial fixedSorted so bounds are satisfied and interiors correspond to origSorted - - for (LO i = 0; i < closestToLeftBound; i++) fixedSorted(rowIdx, i) = leftBound; - for (LO i = closestToLeftBound; i < closestToRghtBound; i++) fixedSorted(rowIdx, i) = origSorted(rowIdx, i); - for (LO i = closestToRghtBound; i < static_cast(nnz); i++) fixedSorted(rowIdx, i) = rghtBound; - - while ((KAT::magnitude(rowSumDeviation) > KAT::magnitude((one * 1.e-10) * rsumTarget))) { // && ( (closestToLeftBound < nEntries ) || (closestToRghtBound < nEntries))) { - if (closestToRghtBound != closestToLeftBound) - delta = rowSumDeviation / static_cast(closestToRghtBound - closestToLeftBound); - else - delta = aBigNumber; - - if (KAT::magnitude(closestToLeftBoundDist) <= KAT::magnitude(closestToRghtBoundDist)) { - if (KAT::magnitude(delta) <= KAT::magnitude(closestToLeftBoundDist)) { - rowSumDeviation = zero; - for (LO i = closestToLeftBound; i < closestToRghtBound; i++) fixedSorted(rowIdx, i) = origSorted(rowIdx, i) - delta; - } else { - rowSumDeviation = rowSumDeviation - closestToLeftBoundDist; - fixedSorted(rowIdx, closestToLeftBound) = leftBound; - closestToLeftBound++; - if (closestToLeftBound < static_cast(nnz)) - closestToLeftBoundDist = origSorted(rowIdx, closestToLeftBound) - leftBound; - else - closestToLeftBoundDist = aBigNumber; - } - } else { - if (KAT::magnitude(delta) <= KAT::magnitude(closestToRghtBoundDist)) { - rowSumDeviation = 0; - for (LO i = closestToLeftBound; i < closestToRghtBound; i++) fixedSorted(rowIdx, i) = origSorted(rowIdx, i) - delta; - } else { - rowSumDeviation = rowSumDeviation + closestToRghtBoundDist; - // if (closestToRghtBound < nEntries) { - fixedSorted(rowIdx, closestToRghtBound) = origSorted(rowIdx, closestToRghtBound); - closestToRghtBound++; - // } - if (closestToRghtBound >= static_cast(nnz)) - closestToRghtBoundDist = aBigNumber; - else - closestToRghtBoundDist = origSorted(rowIdx, closestToRghtBound) - rghtBound; - } - } - } - - auto rowStart = rowPtr(rowIdx); - if (flipped) { - /* flip sign of fixedSorted and reverse ordering so that the positve version is sorted */ - - if ((nnz % 2) == 1) fixedSorted(rowIdx, (nnz / 2)) = -fixedSorted(rowIdx, (nnz / 2)); - for (LO i = 0; i < static_cast(nnz / 2); i++) { - temp = fixedSorted(rowIdx, i); - fixedSorted(rowIdx, i) = -fixedSorted(rowIdx, nnz - 1 - i); - fixedSorted(rowIdx, nnz - i - 1) = -temp; - } - } - // unsort and update row values with new values - for (LO i = 0; i < static_cast(nnz); i++) values(rowStart + inds(rowIdx, i)) = fixedSorted(rowIdx, i); - - } else { // row does not have feasible solution to match constraint - // just set all entries to the same value giving a row sum of 1 - for (auto entryIdx = rowPtr(rowIdx); entryIdx < rowPtr(rowIdx + 1); entryIdx++) values(entryIdx) = one / (static_cast(nnz)); - } - } - } - } -}; - -template -void SaPFactory_kokkos::SatisfyPConstraints(const RCP A, RCP& P) const { - using Device = typename Matrix::local_matrix_type::device_type; - LO nPDEs = A->GetFixedBlockSize(); - - using local_mat_type = typename Matrix::local_matrix_type; - constraintKernel myKernel(nPDEs, P->getLocalMatrixDevice()); - Kokkos::parallel_for("enforce constraint", Kokkos::RangePolicy(0, P->getRowMap()->getLocalNumElements()), - myKernel); - -} // SatsifyPConstraints() - -template -void SaPFactory_kokkos::optimalSatisfyPConstraintsForScalarPDEs(RCP& P) const { - using Device = typename Matrix::local_matrix_type::device_type; - LO nPDEs = 1; // A->GetFixedBlockSize(); - - using local_mat_type = typename Matrix::local_matrix_type; - optimalSatisfyConstraintsForScalarPDEsKernel myKernel(nPDEs, P->getLocalMaxNumRowEntries(), P->getLocalMatrixDevice()); - Kokkos::parallel_for("enforce constraint", Kokkos::RangePolicy(0, P->getLocalNumRows()), - myKernel); - -} // SatsifyPConstraints() - -} // namespace MueLu - #endif // MUELU_SAPFACTORY_KOKKOS_DEF_HPP - -// TODO: restrictionMode_ should use the parameter list. diff --git a/packages/muelu/src/Utils/ClassList/SC-LO-GO-NO.classList b/packages/muelu/src/Utils/ClassList/SC-LO-GO-NO.classList index ba0a2b68358c..fb5f2e6315cd 100644 --- a/packages/muelu/src/Utils/ClassList/SC-LO-GO-NO.classList +++ b/packages/muelu/src/Utils/ClassList/SC-LO-GO-NO.classList @@ -98,7 +98,7 @@ RepartitionHeuristicFactory - #ifdef HAVE_MPI ReplicatePFactory RigidBodyModeFactory SaPFactory -SaPFactory_kokkos +SaPFactory_kokkos - #if defined(HAVE_MUELU_DEPRECATED_CODE) ScaledNullspaceFactory SchurComplementFactory SegregatedAFactory diff --git a/packages/muelu/src/Utils/ExplicitInstantiation/ETI_SC_LO_GO_NO_classes.cmake b/packages/muelu/src/Utils/ExplicitInstantiation/ETI_SC_LO_GO_NO_classes.cmake index 7cec51dbf249..38e336a5bf67 100644 --- a/packages/muelu/src/Utils/ExplicitInstantiation/ETI_SC_LO_GO_NO_classes.cmake +++ b/packages/muelu/src/Utils/ExplicitInstantiation/ETI_SC_LO_GO_NO_classes.cmake @@ -95,7 +95,7 @@ APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::RepartitionHeuristicFactory-.?if APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::ReplicatePFactory ) APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::RigidBodyModeFactory ) APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::SaPFactory ) -APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::SaPFactory_kokkos ) +APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::SaPFactory_kokkos-.?if.defined[HAVE_MUELU_DEPRECATED_CODE] ) APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::ScaledNullspaceFactory ) APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::SchurComplementFactory ) APPEND_SET(MUELU_SC_LO_GO_NO_ETI_CLASSES MueLu::SegregatedAFactory ) diff --git a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_SaPFactory_kokkos_fwd.hpp b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_SaPFactory_kokkos_fwd.hpp index c93264c32ac3..6629c193a721 100644 --- a/packages/muelu/src/Utils/ForwardDeclaration/MueLu_SaPFactory_kokkos_fwd.hpp +++ b/packages/muelu/src/Utils/ForwardDeclaration/MueLu_SaPFactory_kokkos_fwd.hpp @@ -46,6 +46,9 @@ #ifndef MUELU_SAPFACTORY_KOKKOS_FWD_HPP #define MUELU_SAPFACTORY_KOKKOS_FWD_HPP +#include "MueLu_ConfigDefs.hpp" +#if defined(HAVE_MUELU_DEPRECATED_CODE) + namespace MueLu { template class SaPFactory_kokkos; @@ -55,4 +58,6 @@ class SaPFactory_kokkos; #define MUELU_SAPFACTORY_KOKKOS_SHORT #endif +#endif + #endif // MUELU_SAPFACTORY_KOKKOS_FWD_HPP diff --git a/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp b/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp index b175b78fc819..ec4f388127e0 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp +++ b/packages/muelu/src/Utils/MueLu_Utilities_decl.hpp @@ -95,6 +95,7 @@ class Epetra_Vector; #include #include #include +#include #include #include @@ -512,7 +513,8 @@ class Utilities : public UtilitiesBase mat = rcp_dynamic_cast(Op); + RCP mat = rcp_dynamic_cast(Op); + RCP > rmat = rcp_dynamic_cast >(Op); if (!mat.is_null()) { RCP crsOp = rcp_dynamic_cast(mat); if (crsOp == Teuchos::null) @@ -529,6 +531,8 @@ class Utilities : public UtilitiesBasegetTpetra_BlockCrsMatrixNonConst(); } + } else if (!rmat.is_null()) { + return rmat->getTpetra_RowMatrix(); } else { RCP tpOp = rcp_dynamic_cast(Op, true); RCP > tOp = tpOp->getOperatorConst(); @@ -543,7 +547,8 @@ class Utilities : public UtilitiesBase mat = rcp_dynamic_cast(Op); + RCP mat = rcp_dynamic_cast(Op); + RCP > rmat = rcp_dynamic_cast >(Op); if (!mat.is_null()) { RCP crsOp = rcp_dynamic_cast(mat); if (crsOp == Teuchos::null) @@ -560,6 +565,8 @@ class Utilities : public UtilitiesBasegetTpetra_BlockCrsMatrixNonConst(); } + } else if (!rmat.is_null()) { + return rmat->getTpetra_RowMatrixNonConst(); } else { RCP tpOp = rcp_dynamic_cast(Op, true); RCP > tOp = tpOp->getOperator(); diff --git a/packages/muelu/src/Utils/MueLu_Utilities_def.hpp b/packages/muelu/src/Utils/MueLu_Utilities_def.hpp index 0c72919eebe0..45ffa100fcb4 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities_def.hpp +++ b/packages/muelu/src/Utils/MueLu_Utilities_def.hpp @@ -48,8 +48,10 @@ #include #include +#include #include "MueLu_ConfigDefs.hpp" +#include "Xpetra_TpetraRowMatrix.hpp" #ifdef HAVE_MUELU_EPETRA #ifdef HAVE_MPI @@ -354,7 +356,8 @@ Tpetra::BlockCrsMatrix& Utilities RCP> Utilities::Op2TpetraRow(RCP> Op) { - RCP> mat = rcp_dynamic_cast>(Op); + RCP> mat = rcp_dynamic_cast>(Op); + RCP> rmat = rcp_dynamic_cast>(Op); if (!mat.is_null()) { RCP> crsOp = rcp_dynamic_cast>(mat); if (crsOp == Teuchos::null) @@ -371,6 +374,8 @@ RCP> Utilitie throw Exceptions::BadCast("Cast from Xpetra::CrsMatrix to Xpetra::TpetraCrsMatrix and Xpetra::TpetraBlockCrsMatrix failed"); return tmp_BlockCrs->getTpetra_BlockCrsMatrixNonConst(); } + } else if (!rmat.is_null()) { + return rmat->getTpetra_RowMatrix(); } else { RCP> tpOp = rcp_dynamic_cast>(Op, true); RCP> tOp = tpOp->getOperatorConst(); @@ -381,7 +386,8 @@ RCP> Utilitie template RCP> Utilities::Op2NonConstTpetraRow(RCP> Op) { - RCP> mat = rcp_dynamic_cast>(Op); + RCP> mat = rcp_dynamic_cast>(Op); + RCP> rmat = rcp_dynamic_cast>(Op); if (!mat.is_null()) { RCP> crsOp = rcp_dynamic_cast>(mat); if (crsOp == Teuchos::null) @@ -398,6 +404,8 @@ RCP> UtilitiesgetTpetra_BlockCrsMatrixNonConst(); } + } else if (!rmat.is_null()) { + return rmat->getTpetra_RowMatrixNonConst(); } else { RCP> tpOp = rcp_dynamic_cast>(Op, true); RCP> tOp = tpOp->getOperator(); diff --git a/packages/muelu/test/interface/kokkos/Output/MLaux_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLaux_tpetra.gold index d7826f814e60..0f01f3917fe2 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLaux_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLaux_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLcoarse1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLcoarse1_tpetra.gold index fd76f38c17fe..a59513adfcff 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLcoarse1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLcoarse1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLcoarse2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLcoarse2_tpetra.gold index 6816d58877a1..9086c4e5f506 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLcoarse2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLcoarse2_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -153,7 +153,7 @@ smoother -> timer for apply = 0 Level 5 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLcoarse3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLcoarse3_tpetra.gold index f9064ce04145..d308a4bc6af2 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLcoarse3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLcoarse3_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLcoarse4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLcoarse4_tpetra.gold index 09d65c8a2163..6d6f4cc04a6b 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLcoarse4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLcoarse4_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLcoarse5_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLcoarse5_tpetra.gold index b5e887ead808..cac568f06868 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLcoarse5_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLcoarse5_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLpgamg1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLpgamg1_tpetra.gold index a70ca776ec40..44b6284e32d9 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLpgamg1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLpgamg1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -32,7 +32,7 @@ sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> [empty list] Call prolongator factory for calculating restrictor (MueLu::GenericRFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) sa: damping factor = 1.333 sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> @@ -50,7 +50,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -73,7 +73,7 @@ sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> [empty list] Call prolongator factory for calculating restrictor (MueLu::GenericRFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) sa: damping factor = 1.333 sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> @@ -91,7 +91,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -114,7 +114,7 @@ sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> [empty list] Call prolongator factory for calculating restrictor (MueLu::GenericRFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) sa: damping factor = 1.333 sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> @@ -132,7 +132,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -155,7 +155,7 @@ sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> [empty list] Call prolongator factory for calculating restrictor (MueLu::GenericRFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) sa: damping factor = 1.333 sa: eigenvalue estimate num iterations = 10 matrixmatrix: kernel params -> diff --git a/packages/muelu/test/interface/kokkos/Output/MLrepartitioning1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLrepartitioning1_tpetra.gold index 4920dabee52d..5073aefe576d 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLrepartitioning1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLrepartitioning1_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -61,7 +61,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -112,7 +112,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -163,7 +163,7 @@ smoother -> Level 4 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -214,7 +214,7 @@ smoother -> Level 5 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLrepartitioning2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLrepartitioning2_tpetra.gold index 961d8228215d..3eeaf2a6528e 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLrepartitioning2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLrepartitioning2_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -63,7 +63,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -116,7 +116,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -169,7 +169,7 @@ smoother -> Level 4 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLrepartitioning3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLrepartitioning3_tpetra.gold index 9957f4b1fd89..69572cc64d41 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLrepartitioning3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLrepartitioning3_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -64,7 +64,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -118,7 +118,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -172,7 +172,7 @@ smoother -> Level 4 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLsmoother1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLsmoother1_tpetra.gold index f9064ce04145..d308a4bc6af2 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLsmoother1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLsmoother1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLsmoother2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLsmoother2_tpetra.gold index 46bac807d4af..bb50b5fdb518 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLsmoother2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLsmoother2_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLsmoother3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLsmoother3_tpetra.gold index 9fa18ebfe89d..835095475959 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLsmoother3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLsmoother3_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLsmoother4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLsmoother4_tpetra.gold index d9b6341cabab..3757339a77df 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLsmoother4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLsmoother4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -47,7 +47,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -84,7 +84,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -121,7 +121,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/MLunsmoothed1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/MLunsmoothed1_tpetra.gold index f7ecc26891fc..66cce4e4b90b 100644 --- a/packages/muelu/test/interface/kokkos/Output/MLunsmoothed1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/MLunsmoothed1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -81,7 +81,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -117,7 +117,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/aggregation1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/aggregation1_tpetra.gold index 34c0a30640c5..3e08856bd6cc 100644 --- a/packages/muelu/test/interface/kokkos/Output/aggregation1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/aggregation1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/aggregation3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/aggregation3_tpetra.gold index 21484db9c3d1..1e9cdc73774e 100644 --- a/packages/muelu/test/interface/kokkos/Output/aggregation3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/aggregation3_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -45,7 +45,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/aggregation4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/aggregation4_tpetra.gold index 837dafaa55d5..57cf2ec15f45 100644 --- a/packages/muelu/test/interface/kokkos/Output/aggregation4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/aggregation4_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -48,7 +48,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/coarse1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/coarse1_tpetra.gold index 6c854f21bf6c..b289d035dda9 100644 --- a/packages/muelu/test/interface/kokkos/Output/coarse1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/coarse1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -75,7 +75,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/coarse2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/coarse2_tpetra.gold index 774aa7fb6a7e..2226b1e34413 100644 --- a/packages/muelu/test/interface/kokkos/Output/coarse2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/coarse2_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -75,7 +75,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -108,7 +108,7 @@ smoother -> timer for apply = 0 Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -141,7 +141,7 @@ smoother -> timer for apply = 0 Level 5 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/coarse3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/coarse3_tpetra.gold index d9baf3db31af..bed828c7df82 100644 --- a/packages/muelu/test/interface/kokkos/Output/coarse3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/coarse3_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/default_e3d_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/default_e3d_tpetra.gold index 8474ed3a4724..591dfd5fe59e 100644 --- a/packages/muelu/test/interface/kokkos/Output/default_e3d_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/default_e3d_tpetra.gold @@ -8,7 +8,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -40,7 +40,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/default_p2d_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/default_p2d_tpetra.gold index 9919df187359..a3f2ccc308e9 100644 --- a/packages/muelu/test/interface/kokkos/Output/default_p2d_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/default_p2d_tpetra.gold @@ -8,7 +8,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -40,7 +40,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/default_p3d_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/default_p3d_tpetra.gold index 9919df187359..a3f2ccc308e9 100644 --- a/packages/muelu/test/interface/kokkos/Output/default_p3d_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/default_p3d_tpetra.gold @@ -8,7 +8,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -40,7 +40,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/driver_drekar1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/driver_drekar1_np4_tpetra.gold index 55547a689b78..c56ac4a46dcb 100644 --- a/packages/muelu/test/interface/kokkos/Output/driver_drekar1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/driver_drekar1_np4_tpetra.gold @@ -13,7 +13,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -95,7 +95,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -152,7 +152,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/driver_drekar1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/driver_drekar1_tpetra.gold index 16ee9f530b57..c8225b994621 100644 --- a/packages/muelu/test/interface/kokkos/Output/driver_drekar1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/driver_drekar1_tpetra.gold @@ -13,7 +13,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -70,7 +70,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -127,7 +127,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/driver_drekar2_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/driver_drekar2_np4_tpetra.gold index 30c431b30827..e195f2265097 100644 --- a/packages/muelu/test/interface/kokkos/Output/driver_drekar2_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/driver_drekar2_np4_tpetra.gold @@ -13,7 +13,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -97,7 +97,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -156,7 +156,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/driver_drekar2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/driver_drekar2_tpetra.gold index 438725f05acd..d9166a4a3f3a 100644 --- a/packages/muelu/test/interface/kokkos/Output/driver_drekar2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/driver_drekar2_tpetra.gold @@ -13,7 +13,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -72,7 +72,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -131,7 +131,7 @@ smoother -> Level 3 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/empty_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/empty_tpetra.gold index 34c0a30640c5..3e08856bd6cc 100644 --- a/packages/muelu/test/interface/kokkos/Output/empty_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/empty_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np1_tpetra.gold index a13c256a4d99..61ecae9e7780 100644 --- a/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -43,7 +43,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -77,7 +77,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np4_tpetra.gold index 62f3060eee55..0117cfa2fd4d 100644 --- a/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/operator_solve_1_np4_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -43,7 +43,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -77,7 +77,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np1_tpetra.gold index ed30ade10b66..622442f2328f 100644 --- a/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np1_tpetra.gold @@ -20,7 +20,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -52,7 +52,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np4_tpetra.gold index 1f648a84c70c..a747e7c913f7 100644 --- a/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/operator_solve_5_np4_tpetra.gold @@ -20,7 +20,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -52,7 +52,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np1_tpetra.gold index aa15945f34ad..fe5914900fb0 100644 --- a/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np1_tpetra.gold @@ -24,7 +24,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -57,7 +57,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np4_tpetra.gold index 2127448c4517..0d4663cf3256 100644 --- a/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/operator_solve_6_np4_tpetra.gold @@ -24,7 +24,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -57,7 +57,7 @@ smoother -> timer for apply = 0 Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/repartition1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/repartition1_np4_tpetra.gold index cd2b091b5b08..bb19eb33551c 100644 --- a/packages/muelu/test/interface/kokkos/Output/repartition1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/repartition1_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -58,7 +58,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/repartition1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/repartition1_tpetra.gold index e843571fc70f..412bfdae6761 100644 --- a/packages/muelu/test/interface/kokkos/Output/repartition1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/repartition1_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -58,7 +58,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/repartition3_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/repartition3_np4_tpetra.gold index 6baf60ca4028..40cd4782bdd0 100644 --- a/packages/muelu/test/interface/kokkos/Output/repartition3_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/repartition3_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -59,7 +59,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/repartition3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/repartition3_tpetra.gold index a4756584a9b7..8848a605bf3d 100644 --- a/packages/muelu/test/interface/kokkos/Output/repartition3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/repartition3_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -59,7 +59,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/repartition4_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/repartition4_np4_tpetra.gold index 3e51ab474468..ef7d15a75400 100644 --- a/packages/muelu/test/interface/kokkos/Output/repartition4_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/repartition4_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -63,7 +63,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/repartition4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/repartition4_tpetra.gold index 5e51a6902e54..53f8ec14732c 100644 --- a/packages/muelu/test/interface/kokkos/Output/repartition4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/repartition4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -63,7 +63,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_np4_tpetra.gold index 5d51843a175e..6bd1e19b0132 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_np4_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_tpetra.gold index 2db981dc9e60..ddb6f2cda9c7 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-1_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_np4_tpetra.gold index 44add789c6d6..35f645ce54df 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_np4_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -56,7 +56,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_tpetra.gold index 1367dc32aaf6..4c6bec2de826 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-RAP-2_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -56,7 +56,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_np4_tpetra.gold index 7a5a12d62dab..f7b528b12da7 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_np4_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -56,7 +56,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_tpetra.gold index d7efdf147bb3..c22abad73532 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-RP-2_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -56,7 +56,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-S-1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-S-1_np4_tpetra.gold index 4f4d6e2a5f46..0ce74043c745 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-S-1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-S-1_np4_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -136,7 +136,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -187,7 +187,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -254,7 +254,7 @@ presmoother -> Amesos2 -> [empty list] Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::TentativePFactory_kokkos) matrixmatrix: kernel params -> [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-S-1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-S-1_tpetra.gold index 5c86d2cfea31..66b3846fcb50 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-S-1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-S-1_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -143,7 +143,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -194,7 +194,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-full-1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-full-1_np4_tpetra.gold index 362f7c1a9a27..3e15b97cf0e3 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-full-1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-full-1_np4_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-full-1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-full-1_tpetra.gold index a2ae71aee46e..df57cead5b10 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-full-1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-full-1_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-none_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-none_np4_tpetra.gold index 5f4aaac30d04..c567d971cec7 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-none_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-none_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -58,7 +58,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -131,7 +131,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -179,7 +179,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -245,7 +245,7 @@ presmoother -> Amesos2 -> [empty list] Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::TentativePFactory_kokkos) matrixmatrix: kernel params -> [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-none_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-none_tpetra.gold index 3006814dbeb7..4898e6dcfb70 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-none_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-none_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -58,7 +58,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -135,7 +135,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -183,7 +183,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_np4_tpetra.gold index ab7e9515b5e0..931773684060 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_np4_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -138,11 +138,12 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] algorithm = "classical": threshold = 0, blocksize = 1 +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator @@ -175,11 +176,12 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] algorithm = "classical": threshold = 0, blocksize = 1 +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator @@ -230,7 +232,8 @@ presmoother -> Amesos2 -> [empty list] Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_tpetra.gold index d02be6ea11ed..283a59d925f1 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-tP-1_tpetra.gold @@ -11,7 +11,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -62,7 +62,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -143,11 +143,12 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] algorithm = "classical": threshold = 0, blocksize = 1 +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator @@ -180,11 +181,12 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] algorithm = "classical": threshold = 0, blocksize = 1 +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_np4_tpetra.gold index 953d50278408..99ad1a23b744 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -63,7 +63,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -140,7 +140,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -177,7 +177,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -247,7 +247,7 @@ presmoother -> Amesos2 -> [empty list] Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::TentativePFactory_kokkos) matrixmatrix: kernel params -> [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_tpetra.gold index 7431f6b462b4..0e209db92aa3 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-tP-2_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -63,7 +63,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -144,7 +144,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -181,7 +181,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_np4_tpetra.gold index b97c9e81a84c..ba9828cca88e 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -61,7 +61,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -136,11 +136,12 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] algorithm = "classical": threshold = 0, blocksize = 1 +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator @@ -173,7 +174,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -241,7 +242,7 @@ presmoother -> Amesos2 -> [empty list] Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::TentativePFactory_kokkos) matrixmatrix: kernel params -> [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_tpetra.gold index 8d4d03efdc3b..41e831b05ba1 100644 --- a/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/reuse-tP-3_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -61,7 +61,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -140,11 +140,12 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] algorithm = "classical": threshold = 0, blocksize = 1 +Reusing previous AP data matrixmatrix: kernel params -> [empty list] Using original prolongator @@ -177,7 +178,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother10_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother10_tpetra.gold index d56549468da5..6aa7782d703e 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother10_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother10_tpetra.gold @@ -7,7 +7,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -38,7 +38,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother11_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother11_tpetra.gold index b0da2c598e81..311d5e8dd74a 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother11_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother11_tpetra.gold @@ -11,7 +11,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -46,7 +46,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother12_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother12_tpetra.gold index b9a905ebe9d4..04ab2a78cbab 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother12_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother12_tpetra.gold @@ -8,7 +8,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -40,7 +40,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -72,7 +72,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 3 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -104,7 +104,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 4 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -136,7 +136,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 5 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother13_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother13_tpetra.gold index 22545fc1373a..69e737694215 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother13_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother13_tpetra.gold @@ -11,7 +11,7 @@ smoother -> timer for apply = 0 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -46,7 +46,7 @@ smoother -> timer for apply = 0 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother1_tpetra.gold index 34c0a30640c5..3e08856bd6cc 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother2_tpetra.gold index 0b2955ae1d23..170df5b0a425 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother2_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother3_tpetra.gold index 1fdaded4eee5..68e878d15b39 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother3_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother4_tpetra.gold index 678d88662e1f..72e5138c42a8 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother4_tpetra.gold @@ -3,7 +3,7 @@ Clearing old data (if any) Level 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -30,7 +30,7 @@ matrixmatrix: kernel params -> [empty list] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother5_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother5_tpetra.gold index 9919df187359..a3f2ccc308e9 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother5_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother5_tpetra.gold @@ -8,7 +8,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -40,7 +40,7 @@ smoother -> chebyshev: boost factor = 1.1 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother6_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother6_tpetra.gold index 5a071954a14d..010f9135f9ac 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother6_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother6_tpetra.gold @@ -6,7 +6,7 @@ smoother -> timer for apply = 0 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -36,7 +36,7 @@ smoother -> timer for apply = 0 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/smoother9_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/smoother9_tpetra.gold index 61cb3206b5ad..2a697355b847 100644 --- a/packages/muelu/test/interface/kokkos/Output/smoother9_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/smoother9_tpetra.gold @@ -11,7 +11,7 @@ smoother -> timer for apply = 0 [unused] Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -46,7 +46,7 @@ smoother -> timer for apply = 0 [unused] Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/sync1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/sync1_tpetra.gold index 34c0a30640c5..3e08856bd6cc 100644 --- a/packages/muelu/test/interface/kokkos/Output/sync1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/sync1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -42,7 +42,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/transpose1_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/transpose1_tpetra.gold index 43e1eb953a49..7bee44217696 100644 --- a/packages/muelu/test/interface/kokkos/Output/transpose1_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/transpose1_tpetra.gold @@ -9,7 +9,7 @@ smoother -> timer for apply = 0 Level 1 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -40,7 +40,7 @@ smoother -> timer for apply = 0 Level 2 -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/transpose2_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/transpose2_np4_tpetra.gold index 0ed0040ddd82..37971dbc7010 100644 --- a/packages/muelu/test/interface/kokkos/Output/transpose2_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/transpose2_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -53,7 +53,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/transpose2_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/transpose2_tpetra.gold index 5b7df85868ea..97aa95528902 100644 --- a/packages/muelu/test/interface/kokkos/Output/transpose2_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/transpose2_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -53,7 +53,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/transpose3_np4_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/transpose3_np4_tpetra.gold index ede21a573a95..823740eaa78e 100644 --- a/packages/muelu/test/interface/kokkos/Output/transpose3_np4_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/transpose3_np4_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -54,7 +54,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/interface/kokkos/Output/transpose3_tpetra.gold b/packages/muelu/test/interface/kokkos/Output/transpose3_tpetra.gold index 96359918712a..899fdd29a9f5 100644 --- a/packages/muelu/test/interface/kokkos/Output/transpose3_tpetra.gold +++ b/packages/muelu/test/interface/kokkos/Output/transpose3_tpetra.gold @@ -10,7 +10,7 @@ smoother -> Level 1 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] @@ -54,7 +54,7 @@ smoother -> Level 2 Build (MueLu::RebalanceTransferFactory) -Prolongator smoothing (MueLu::SaPFactory_kokkos) +Prolongator smoothing (MueLu::SaPFactory) Build (MueLu::CoalesceDropFactory_kokkos) Build (MueLu::AmalgamationFactory) [empty list] diff --git a/packages/muelu/test/structured/structured_interp_sa_kokkos.xml b/packages/muelu/test/structured/structured_interp_sa_kokkos.xml index 1ed7282eb825..f49901223dd0 100644 --- a/packages/muelu/test/structured/structured_interp_sa_kokkos.xml +++ b/packages/muelu/test/structured/structured_interp_sa_kokkos.xml @@ -44,7 +44,7 @@ - + diff --git a/packages/muelu/test/unit_tests/SaPFactory.cpp b/packages/muelu/test/unit_tests/SaPFactory.cpp index b4bed1314a9a..18ae063e73b9 100644 --- a/packages/muelu/test/unit_tests/SaPFactory.cpp +++ b/packages/muelu/test/unit_tests/SaPFactory.cpp @@ -303,6 +303,9 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory, ConstrainRowOptimalScalarPDE, Scal P = Xpetra::IO::Read("TestMatrices/SaP_constrainTest_P.mat", lib, comm); RCP sapFactory = rcp(new SaPFactory); + Teuchos::ParameterList Pparams; + Pparams.set("use kokkos refactor", true); + sapFactory->SetParameterList(Pparams); sapFactory->optimalSatisfyPConstraintsForScalarPDEs(P); // check that row sums are all one by checking the norm of the vector diff --git a/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp b/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp index d9e03b6213de..cd2001f28381 100644 --- a/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp +++ b/packages/muelu/test/unit_tests_kokkos/SaPFactory_kokkos.cpp @@ -55,7 +55,7 @@ #include "MueLu_TestHelpers_kokkos.hpp" #include "MueLu_Version.hpp" -#include "MueLu_SaPFactory_kokkos.hpp" +#include "MueLu_SaPFactory.hpp" #include "MueLu_Utilities.hpp" #include "MueLu_UseDefaultTypes.hpp" @@ -68,7 +68,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory_kokkos, Constructor, Scalar, LocalO MUELU_TESTING_LIMIT_SCOPE(Scalar, GlobalOrdinal, Node); out << "version: " << MueLu::Version() << std::endl; - RCP sapFactory = rcp(new SaPFactory_kokkos); + RCP sapFactory = rcp(new SaPFactory); TEST_EQUALITY(sapFactory != Teuchos::null, true); out << *sapFactory << std::endl; @@ -97,10 +97,11 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory_kokkos, Build, Scalar, LocalOrdinal coarseLevel.Set("P", Ptent); // construct the factory to be tested - const double dampingFactor = 0.5; - RCP sapFactory = rcp(new SaPFactory_kokkos); + const double dampingFactor = 0.5; + RCP sapFactory = rcp(new SaPFactory); ParameterList Pparams; Pparams.set("sa: damping factor", dampingFactor); + Pparams.set("use kokkos refactor", true); sapFactory->SetParameterList(Pparams); sapFactory->SetFactory("A", MueLu::NoFactory::getRCP()); sapFactory->SetFactory("P", MueLu::NoFactory::getRCP()); @@ -190,13 +191,14 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory_kokkos, EnforceConstraints, Scalar, coarseLevel.Set("P", Ptent); // construct the factory to be tested - const double dampingFactor = 0.5; - RCP sapFactory = rcp(new SaPFactory_kokkos); + const double dampingFactor = 0.5; + RCP sapFactory = rcp(new SaPFactory); ParameterList Pparams; Pparams.set("sa: damping factor", dampingFactor); Pparams.set("sa: enforce constraints", true); Pparams.set("sa: max eigenvalue", (double)2.0); Pparams.set("tentative: calculate qr", false); + Pparams.set("use kokkos refactor", true); sapFactory->SetParameterList(Pparams); sapFactory->SetFactory("A", MueLu::NoFactory::getRCP()); @@ -243,7 +245,10 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(SaPFactory_kokkos, ConstrainRowOptimalScalarPD Xpetra::UnderlyingLib lib = TestHelpers_kokkos::Parameters::getLib(); P = Xpetra::IO::Read("../unit_tests/TestMatrices/SaP_constrainTest_P.mat", lib, comm); - RCP sapFactory = rcp(new SaPFactory_kokkos); + RCP sapFactory = rcp(new SaPFactory); + ParameterList Pparams; + Pparams.set("use kokkos refactor", true); + sapFactory->SetParameterList(Pparams); sapFactory->optimalSatisfyPConstraintsForScalarPDEs(P); // check that row sums are all one by checking the norm of the vector diff --git a/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.hpp b/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.hpp index 0415f80a5b0d..1eb60a7a053f 100644 --- a/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.hpp +++ b/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.hpp @@ -452,6 +452,15 @@ namespace panzer { getCubaturePointsRef(const bool cache = true, const bool force = false) const; + /** + * \brief Returns the IntegrationRule + * + * \return panzer::IntegrationRule + */ + Teuchos::RCP + getIntegrationRule() const + {return int_rule;} + // ===================================================================================================== protected: diff --git a/packages/panzer/disc-fe/src/Panzer_IntrepidOrientation.cpp b/packages/panzer/disc-fe/src/Panzer_IntrepidOrientation.cpp index e23b52888355..37affd35bfce 100644 --- a/packages/panzer/disc-fe/src/Panzer_IntrepidOrientation.cpp +++ b/packages/panzer/disc-fe/src/Panzer_IntrepidOrientation.cpp @@ -176,7 +176,7 @@ namespace panzer { vertices(connMgr.getConnectivity(lid),numVerticesPerCell); // This function call expects a view for the vertices, not the nodes - orts[lid] = Intrepid2::Orientation::getOrientation(cellTopo, vertices); + orts[c] = Intrepid2::Orientation::getOrientation(cellTopo, vertices); } } } diff --git a/packages/panzer/disc-fe/src/Panzer_L2Projection.cpp b/packages/panzer/disc-fe/src/Panzer_L2Projection.cpp index bf6bf838100d..fbdefb35fa22 100644 --- a/packages/panzer/disc-fe/src/Panzer_L2Projection.cpp +++ b/packages/panzer/disc-fe/src/Panzer_L2Projection.cpp @@ -127,12 +127,17 @@ namespace panzer { int num_cells_owned = 0; Kokkos::View cell_local_ids; if (useUserSuppliedBasisValues_) { - bv_ptr = basisValues_[block].get(); + // Skip this block if there are no elements in this block on this mpi process auto tmp = connManager_->getElementBlock(block); // no ghosting or virtual in this case + if (tmp.size() == 0) + continue; + Kokkos::View::HostMirror cell_local_ids_host(tmp.data(),tmp.size()); Kokkos::View cell_local_ids_nonconst("cell_local_ids",tmp.size()); Kokkos::deep_copy(cell_local_ids_nonconst,cell_local_ids_host); cell_local_ids = cell_local_ids_nonconst; + + bv_ptr = basisValues_[block].get(); num_cells_owned_ghosted_virtual = cell_local_ids.extent(0); num_cells_owned = cell_local_ids.extent(0); } @@ -142,7 +147,12 @@ namespace panzer { // workset). panzer::WorksetDescriptor wd(block,panzer::WorksetSizeType::ALL_ELEMENTS,true,true); const auto worksets = worksetContainer_->getWorksets(wd); + // Skip this block if there are no elements in this block on this mpi process + if (worksets->size() == 0) + continue; + TEUCHOS_ASSERT(worksets->size() == 1); + const auto& workset = (*worksets)[0]; bv_ptr = &(workset.getBasisValues(targetBasisDescriptor_,integrationDescriptor_)); num_cells_owned_ghosted_virtual = workset.numOwnedCells()+workset.numGhostCells()+workset.numVirtualCells(); @@ -151,106 +161,90 @@ namespace panzer { } const auto& basisValues = *bv_ptr; - // Leaving the commented out workset loop in teh code for now - // in case we want to support the original workset - // construction path in the workset container that is used - // here. + const auto unweightedBasis = basisValues.getBasisValues(false).get_static_view(); + const auto weightedBasis = basisValues.getBasisValues(true).get_static_view(); - // Based on descriptor, currently assumes there should only be one workset - // panzer::WorksetDescriptor wd(block,panzer::WorksetSizeType::ALL_ELEMENTS,true,true); - // const auto worksets = worksetContainer_->getWorksets(wd); + const std::vector& offsets = targetGlobalIndexer_->getGIDFieldOffsets(block,fieldIndex); + PHX::View kOffsets("MassMatrix: Offsets",offsets.size()); + auto kOffsets_h = Kokkos::create_mirror_view(kOffsets); - // for (const auto& workset : *worksets) { + for(const auto& i : offsets) + kOffsets_h(i) = offsets[i]; - // const auto basisValues = workset.getBasisValues(targetBasisDescriptor_,integrationDescriptor_); + Kokkos::deep_copy(kOffsets, kOffsets_h); - const auto unweightedBasis = basisValues.getBasisValues(false).get_static_view(); - const auto weightedBasis = basisValues.getBasisValues(true).get_static_view(); + // Local Ids + PHX::View localIds("MassMatrix: LocalIds", num_cells_owned_ghosted_virtual, + targetGlobalIndexer_->getElementBlockGIDCount(block)); - const std::vector& offsets = targetGlobalIndexer_->getGIDFieldOffsets(block,fieldIndex); - PHX::View kOffsets("MassMatrix: Offsets",offsets.size()); - auto kOffsets_h = Kokkos::create_mirror_view(kOffsets); + // Remove the ghosted cell ids or the call to getElementLocalIds will spill array bounds + const auto cellLocalIdsNoGhost = Kokkos::subview(cell_local_ids,std::make_pair(0,num_cells_owned)); + + targetGlobalIndexer_->getElementLIDs(cellLocalIdsNoGhost,localIds); - for(const auto& i : offsets) - kOffsets_h(i) = offsets[i]; + const int numBasisPoints = static_cast(weightedBasis.extent(1)); + if ( use_lumping ) { + Kokkos::parallel_for(num_cells_owned,KOKKOS_LAMBDA (const int& cell) { + double total_mass = 0.0, trace = 0.0; - Kokkos::deep_copy(kOffsets, kOffsets_h); + panzer::LocalOrdinal cLIDs[256]; + const int numIds = static_cast(localIds.extent(1)); + for(int i=0;i localIds("MassMatrix: LocalIds", num_cells_owned_ghosted_virtual, - targetGlobalIndexer_->getElementBlockGIDCount(block)); + double vals[256]={0.0}; + const int numQP = static_cast(unweightedBasis.extent(2)); - // Remove the ghosted cell ids or the call to getElementLocalIds will spill array bounds - const auto cellLocalIdsNoGhost = Kokkos::subview(cell_local_ids,std::make_pair(0,num_cells_owned)); - - targetGlobalIndexer_->getElementLIDs(cellLocalIdsNoGhost,localIds); - - const int numBasisPoints = static_cast(weightedBasis.extent(1)); - if ( use_lumping ) { - Kokkos::parallel_for(num_cells_owned,KOKKOS_LAMBDA (const int& cell) { - double total_mass = 0.0, trace = 0.0; - - panzer::LocalOrdinal cLIDs[256]; - const int numIds = static_cast(localIds.extent(1)); - for(int i=0;i(unweightedBasis.extent(2)); - - for (int row=0; row < numBasisPoints; ++row) { - for (int col=0; col < numIds; ++col) { - for (int qp=0; qp < numQP; ++qp) { - auto tmp = unweightedBasis(cell,row,qp) * weightedBasis(cell,col,qp) * ebMultiplier; - total_mass += tmp; - if (col == row ) - trace += tmp; - } + for (int row=0; row < numBasisPoints; ++row) { + for (int col=0; col < numIds; ++col) { + for (int qp=0; qp < numQP; ++qp) { + auto tmp = unweightedBasis(cell,row,qp) * weightedBasis(cell,col,qp) * ebMultiplier; + total_mass += tmp; + if (col == row ) + trace += tmp; } } + } - for (int row=0; row < numBasisPoints; ++row) { - for (int col=0; col < numBasisPoints; ++col) - vals[col] = 0; - - int offset = kOffsets(row); - panzer::LocalOrdinal lid = localIds(cell,offset); - int col = row; - vals[col] = 0.0; - for (int qp=0; qp < numQP; ++qp) - vals[col] += unweightedBasis(cell,row,qp) * weightedBasis(cell,col,qp) * ebMultiplier * total_mass / trace; - - M.sumIntoValues(lid,cLIDs,numIds,vals,true,true); - } - }); + for (int row=0; row < numBasisPoints; ++row) { + for (int col=0; col < numBasisPoints; ++col) + vals[col] = 0; - } else { - Kokkos::parallel_for(num_cells_owned,KOKKOS_LAMBDA (const int& cell) { + int offset = kOffsets(row); + panzer::LocalOrdinal lid = localIds(cell,offset); + int col = row; + vals[col] = 0.0; + for (int qp=0; qp < numQP; ++qp) + vals[col] += unweightedBasis(cell,row,qp) * weightedBasis(cell,col,qp) * ebMultiplier * total_mass / trace; - panzer::LocalOrdinal cLIDs[256]; - const int numIds = static_cast(localIds.extent(1)); - for(int i=0;i(unweightedBasis.extent(2)); + } else { + Kokkos::parallel_for(num_cells_owned,KOKKOS_LAMBDA (const int& cell) { + panzer::LocalOrdinal cLIDs[256]; + const int numIds = static_cast(localIds.extent(1)); + for(int i=0;i(unweightedBasis.extent(2)); - for (int col=0; col < numIds; ++col) { - vals[col] = 0.0; - for (int qp=0; qp < numQP; ++qp) - vals[col] += unweightedBasis(cell,row,qp) * weightedBasis(cell,col,qp) * ebMultiplier; - } - M.sumIntoValues(lid,cLIDs,numIds,vals,true,true); + for (int row=0; row < numBasisPoints; ++row) { + int offset = kOffsets(row); + panzer::LocalOrdinal lid = localIds(cell,offset); + for (int col=0; col < numIds; ++col) { + vals[col] = 0.0; + for (int qp=0; qp < numQP; ++qp) + vals[col] += unweightedBasis(cell,row,qp) * weightedBasis(cell,col,qp) * ebMultiplier; } + M.sumIntoValues(lid,cLIDs,numIds,vals,true,true); - }); - } - //} loop over worksets + } + }); + } } } else { auto M = ghostedMatrix->getLocalMatrixDevice(); @@ -260,63 +254,94 @@ namespace panzer { if (elementBlockMultipliers != nullptr) ebMultiplier = elementBlockMultipliers->find(block)->second; - // Based on descriptor, currently assumes there should only be one workset - panzer::WorksetDescriptor wd(block,panzer::WorksetSizeType::ALL_ELEMENTS,true,true); - const auto& worksets = worksetContainer_->getWorksets(wd); + // Get the cell local ids and set the BasisValues object (BV + // can come from a user defined set or from WorksetContainer). + const panzer::BasisValues2* bv_ptr; + int num_cells_owned_ghosted_virtual = 0; + int num_cells_owned = 0; + Kokkos::View cell_local_ids; + if (useUserSuppliedBasisValues_) { + // Skip this block if there are no elements in this block on this mpi process + auto tmp = connManager_->getElementBlock(block); // no ghosting or virtual in this case + if (tmp.size() == 0) + continue; - for (const auto& workset : *worksets) { + Kokkos::View::HostMirror cell_local_ids_host(tmp.data(),tmp.size()); + Kokkos::View cell_local_ids_nonconst("cell_local_ids",tmp.size()); + Kokkos::deep_copy(cell_local_ids_nonconst,cell_local_ids_host); + cell_local_ids = cell_local_ids_nonconst; - const auto basisValues = workset.getBasisValues(targetBasisDescriptor_,integrationDescriptor_); + bv_ptr = basisValues_[block].get(); + num_cells_owned_ghosted_virtual = cell_local_ids.extent(0); + num_cells_owned = cell_local_ids.extent(0); + } + else { + // Based on descriptor, currently assumes there should only + // be one workset (partitioned path assumes a single + // workset). + panzer::WorksetDescriptor wd(block,panzer::WorksetSizeType::ALL_ELEMENTS,true,true); + const auto worksets = worksetContainer_->getWorksets(wd); + // Skip this block if there are no elements in this block on this mpi process + if (worksets->size() == 0) + continue; - const auto unweightedBasis = basisValues.getVectorBasisValues(false).get_static_view(); - const auto weightedBasis = basisValues.getVectorBasisValues(true).get_static_view(); + TEUCHOS_ASSERT(worksets->size() == 1); - const std::vector& offsets = targetGlobalIndexer_->getGIDFieldOffsets(block,fieldIndex); - PHX::View kOffsets("MassMatrix: Offsets",offsets.size()); - auto kOffsets_h = Kokkos::create_mirror_view(kOffsets); + const auto& workset = (*worksets)[0]; + bv_ptr = &(workset.getBasisValues(targetBasisDescriptor_,integrationDescriptor_)); + num_cells_owned_ghosted_virtual = workset.numOwnedCells()+workset.numGhostCells()+workset.numVirtualCells(); + num_cells_owned = workset.numOwnedCells(); + cell_local_ids = workset.getLocalCellIDs(); + } + const auto& basisValues = *bv_ptr; - for(const auto& i : offsets) - kOffsets_h(i) = offsets[i]; + const auto unweightedBasis = basisValues.getVectorBasisValues(false).get_static_view(); + const auto weightedBasis = basisValues.getVectorBasisValues(true).get_static_view(); - Kokkos::deep_copy(kOffsets, kOffsets_h); + const std::vector& offsets = targetGlobalIndexer_->getGIDFieldOffsets(block,fieldIndex); + PHX::View kOffsets("MassMatrix: Offsets",offsets.size()); + auto kOffsets_h = Kokkos::create_mirror_view(kOffsets); - // Local Ids - PHX::View localIds("MassMatrix: LocalIds", workset.numOwnedCells()+workset.numGhostCells()+workset.numVirtualCells(), - targetGlobalIndexer_->getElementBlockGIDCount(block)); + for(const auto& i : offsets) + kOffsets_h(i) = offsets[i]; - // Remove the ghosted cell ids or the call to getElementLocalIds will spill array bounds - const PHX::View cellLocalIdsNoGhost = Kokkos::subview(workset.cell_local_ids_k,std::make_pair(0,workset.numOwnedCells())); + Kokkos::deep_copy(kOffsets, kOffsets_h); - targetGlobalIndexer_->getElementLIDs(cellLocalIdsNoGhost,localIds); + // Local Ids + PHX::View localIds("MassMatrix: LocalIds", num_cells_owned_ghosted_virtual, + targetGlobalIndexer_->getElementBlockGIDCount(block)); - const int numBasisPoints = static_cast(weightedBasis.extent(1)); - Kokkos::parallel_for(workset.numOwnedCells(),KOKKOS_LAMBDA (const int& cell) { + // Remove the ghosted cell ids or the call to getElementLocalIds will spill array bounds + const PHX::View cellLocalIdsNoGhost = Kokkos::subview(cell_local_ids,std::make_pair(0,num_cells_owned)); - panzer::LocalOrdinal cLIDs[256]; - const int numIds = static_cast(localIds.extent(1)); - for(int i=0;igetElementLIDs(cellLocalIdsNoGhost,localIds); - double vals[256]; - const int numQP = static_cast(unweightedBasis.extent(2)); + const int numBasisPoints = static_cast(weightedBasis.extent(1)); + Kokkos::parallel_for(num_cells_owned,KOKKOS_LAMBDA (const int& cell) { - for (int qp=0; qp < numQP; ++qp) { - for (int row=0; row < numBasisPoints; ++row) { - int offset = kOffsets(row); - panzer::LocalOrdinal lid = localIds(cell,offset); + panzer::LocalOrdinal cLIDs[256]; + const int numIds = static_cast(localIds.extent(1)); + for(int i=0;i(weightedBasis.extent(3)); ++dim) - vals[col] += unweightedBasis(cell,row,qp,dim) * weightedBasis(cell,col,qp,dim) * ebMultiplier; - } + double vals[256]; + const int numQP = static_cast(unweightedBasis.extent(2)); + + for (int qp=0; qp < numQP; ++qp) { + for (int row=0; row < numBasisPoints; ++row) { + int offset = kOffsets(row); + panzer::LocalOrdinal lid = localIds(cell,offset); - M.sumIntoValues(lid,cLIDs,numIds,vals,true,true); + for (int col=0; col < numIds; ++col){ + vals[col] = 0.0; + for(int dim=0; dim < static_cast(weightedBasis.extent(3)); ++dim) + vals[col] += unweightedBasis(cell,row,qp,dim) * weightedBasis(cell,col,qp,dim) * ebMultiplier; } - } - }); - } + M.sumIntoValues(lid,cLIDs,numIds,vals,true,true); + } + } + }); } } diff --git a/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp b/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp index 9a70d84877a5..94192c84c054 100644 --- a/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp +++ b/packages/panzer/disc-fe/src/Panzer_L2Projection.hpp @@ -84,7 +84,7 @@ namespace panzer { projection onto a target basis. \param use_lumping (optional) If set to true, the returned mass matrix is a lumped diagonal mass matrix following Hinton, et al. 1976. - \param elementBlockMultipliers (optional) If non-null, a multiplier will be used for each element block. The elements should be ordered corresponding to commManger block ordering. + \param elementBlockMultipliers (optional) If non-null, a multiplier will be used for each element block. The elements should be ordered corresponding to commManger block ordering. \returns Filled mass matrix in a Tpetra::CrsMatrix */ Teuchos::RCP>> @@ -92,7 +92,7 @@ namespace panzer { const std::unordered_map* elementBlockMultipliers = nullptr); /** \brief Allocates, fills and returns a Tpetra::MultiVector - containing the inverse lumped mass matrix values as computed via Hinton 1976. + containing the inverse lumped mass matrix values as computed via Hinton 1976. References: diff --git a/packages/piro/src/Piro_ProductModelEval.hpp b/packages/piro/src/Piro_ProductModelEval.hpp index 9266def3cccb..752e4f6ce8b4 100644 --- a/packages/piro/src/Piro_ProductModelEval.hpp +++ b/packages/piro/src/Piro_ProductModelEval.hpp @@ -489,9 +489,9 @@ ProductModelEvaluator::evalModelImpl( if (supports_dfdp_op) { Teuchos::RCP> dfdp_op = Teuchos::rcp_dynamic_cast>(outArgs.get_DfDp(0).getLinearOp()); - if (!Teuchos::is_null(dfdp_op)) - for(std::size_t j=0; j(Teuchos::rcp_dynamic_cast>(dfdp_op->getNonconstBlock(0, j)))); + if (Teuchos::nonnull(dfdp_op)) { + for(std::size_t j=0; j(Teuchos::rcp_dynamic_cast>(dfdp_op->getNonconstBlock(0, j)))); } } @@ -499,7 +499,7 @@ ProductModelEvaluator::evalModelImpl( if (outArgs.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DgDp,i,0).supports(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP)) { Teuchos::RCP> dgdp_op = Teuchos::rcp_dynamic_cast>(outArgs.get_DgDp(i,0).getLinearOp()); - if (!Teuchos::is_null(dgdp_op)) { + if (Teuchos::nonnull(dgdp_op)) { for(std::size_t j=0; j>( Teuchos::rcp_dynamic_cast>(dgdp_op->getNonconstBlock(0, j))->getNonconstOp() ); @@ -524,6 +524,20 @@ ProductModelEvaluator::evalModelImpl( } } + for (auto i = 0; i < thyra_model_->Ng(); ++i) { + bool suppGradMV = outArgs.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DgDp,i,0).supports(Thyra::ModelEvaluatorBase::DERIV_MV_GRADIENT_FORM); + bool suppJacMV = outArgs.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DgDp,i,0).supports(Thyra::ModelEvaluatorBase::DERIV_MV_JACOBIAN_FORM); + if (suppGradMV || suppJacMV) { + auto dgdp_vec = Teuchos::rcp_dynamic_cast>(outArgs.get_DgDp(i,0).getMultiVector()); + if (Teuchos::nonnull(dgdp_vec)) { + auto dgdp_orient = suppGradMV ? Thyra::ModelEvaluatorBase::DERIV_MV_GRADIENT_FORM : Thyra::ModelEvaluatorBase::DERIV_MV_JACOBIAN_FORM; + for(std::size_t j=0; j(dgdp_vec->getNonconstMultiVectorBlock(j), dgdp_orient)); + } + } + } + } + thyra_model_->evalModel(internal_inArgs,internal_outArgs); for (auto g_index = 0; g_index < thyra_model_->Ng(); ++g_index) { @@ -804,24 +818,39 @@ ProductModelEvaluator::fromInternalOutArgs(const Thyra::ModelEvaluatorBase for (auto g_index = 0; g_index < outArgs1.Ng(); ++g_index) { outArgs2.setSupports(Thyra::ModelEvaluator::OUT_ARG_DgDx, g_index, outArgs1.supports(Thyra::ModelEvaluator::OUT_ARG_DgDx, g_index)); outArgs2.setSupports(Thyra::ModelEvaluator::OUT_ARG_DgDx_dot, g_index, outArgs1.supports(Thyra::ModelEvaluator::OUT_ARG_DgDx_dot, g_index)); - Thyra::ModelEvaluatorBase::DerivativeSupport dgdp_support; + + bool suppLinOp(true), suppGradMV(true), suppJacMV(true); for (std::size_t i = 0; i < p_indices_.size(); ++i) { - if (!outArgs1.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DgDp, g_index, p_indices_[i]).none()) { - dgdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP); - break; - } + const auto& dgdpi_support = outArgs1.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DgDp, g_index, p_indices_[i]); + suppLinOp = dgdpi_support.supports(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP) ? suppLinOp : false; + suppGradMV = dgdpi_support.supports(Thyra::ModelEvaluatorBase::DERIV_MV_GRADIENT_FORM) ? suppGradMV : false; + suppJacMV = dgdpi_support.supports(Thyra::ModelEvaluatorBase::DERIV_MV_JACOBIAN_FORM) ? suppJacMV : false; } + + Thyra::ModelEvaluatorBase::DerivativeSupport dgdp_support; + if(suppLinOp) dgdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP); + if(suppGradMV) dgdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_MV_GRADIENT_FORM); + if(suppJacMV) dgdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_MV_JACOBIAN_FORM); + outArgs2.setSupports(Thyra::ModelEvaluator::OUT_ARG_DgDp, g_index, 0, dgdp_support); } - Thyra::ModelEvaluatorBase::DerivativeSupport dfdp_support; - for (std::size_t i = 0; i < p_indices_.size(); ++i) { - if (!outArgs1.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DfDp, p_indices_[i]).none()) { - dfdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP); - break; + { //DfDp + bool suppLinOp(true), suppGradMV(true), suppJacMV(true); + for (std::size_t i = 0; i < p_indices_.size(); ++i) { + const auto& dfdpi_support = outArgs1.supports(Thyra::ModelEvaluatorBase::OUT_ARG_DfDp, p_indices_[i]); + suppLinOp = dfdpi_support.supports(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP) ? suppLinOp : false; + suppGradMV = dfdpi_support.supports(Thyra::ModelEvaluatorBase::DERIV_MV_GRADIENT_FORM) ? suppGradMV : false; + suppJacMV = dfdpi_support.supports(Thyra::ModelEvaluatorBase::DERIV_MV_JACOBIAN_FORM) ? suppJacMV : false; } + + Thyra::ModelEvaluatorBase::DerivativeSupport dfdp_support; + if(suppLinOp) dfdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_LINEAR_OP); + if(suppGradMV) dfdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_MV_GRADIENT_FORM); + if(suppJacMV) dfdp_support.plus(Thyra::ModelEvaluatorBase::DERIV_MV_JACOBIAN_FORM); + + outArgs2.setSupports(Thyra::ModelEvaluator::OUT_ARG_DfDp, 0, dfdp_support); } - outArgs2.setSupports(Thyra::ModelEvaluator::OUT_ARG_DfDp, 0, dfdp_support); for (auto g_index = 0; g_index < outArgs1.Ng(); ++g_index) { diff --git a/packages/piro/test/Main_ThyraSolver_Tpetra.cpp b/packages/piro/test/Main_ThyraSolver_Tpetra.cpp index 98f1afd51f72..c1a75ed79a03 100644 --- a/packages/piro/test/Main_ThyraSolver_Tpetra.cpp +++ b/packages/piro/test/Main_ThyraSolver_Tpetra.cpp @@ -197,7 +197,10 @@ int main(int argc, char *argv[]) { << "\n-----------------------------------------------------------------" << std::setprecision(9) << std::endl; - if (Teuchos::nonnull(p1)) { + if (Teuchos::is_null(p1)) { + out << "\nError: parameters pointer is null" << std::endl; + status += 33; + } else { out << "\nParameters! {1,1}\n" << *p1 << std::endl; Thyra::DetachedVectorView p_view(p1->clone_v()); @@ -212,7 +215,10 @@ int main(int argc, char *argv[]) { << "Difference in l2 norm: " << l2_diff << " > tol: " << tol << std::endl; } } - if (Teuchos::nonnull(g1)) { + if (Teuchos::is_null(g1)) { + out << "\nError: Responses pointer is null" << std::endl; + status += 33; + } else { out << "\nResponses! {8.0}\n" << *g1 << std::endl; Thyra::DetachedVectorView g_view(g1); @@ -228,7 +234,10 @@ int main(int argc, char *argv[]) { << "Absolute difference: " << diff << " > tol: " << tol << std::endl; } } - if (Teuchos::nonnull(gx)) { + if (Teuchos::is_null(gx)) { + out << "\nError: solution pointer is null" << std::endl; + status += 33; + } else { out << "\nSolution! {1,2,3,4}\n" << *gx << std::endl; Thyra::DetachedVectorView x_view(gx); @@ -246,7 +255,10 @@ int main(int argc, char *argv[]) { << "Difference in l2 norm: " << l2_diff << " > tol: " << tol << std::endl; } } - if (Teuchos::nonnull(dgdp)) { + if (Teuchos::is_null(dgdp)) { + out << "\nError: sensitivities pointer is null" << std::endl; + status += 33; + } else { out << "\nSensitivities {6.66667, -8.0}\n" << *dgdp << std::endl; Thyra::DetachedVectorView dgdp_view(dgdp->col(0)); @@ -263,7 +275,11 @@ int main(int argc, char *argv[]) { } } - if (Teuchos::nonnull(hv)) { + if (Teuchos::is_null(hv)) { + //FIX this + //out << "\nError: hessian pointer is null" << std::endl; + //status += 33; + } else { double hv_exact[4] = {6., -10./3, -10./3, 4.}; for (int i_direction = 0; i_direction < n_directions; i_direction++) { out << "\n hv[" << i_direction << "]\n" diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_decl.hpp index 4b9b6f0c550f..144e8ef5c450 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_decl.hpp @@ -107,9 +107,9 @@ namespace FROSch { SC alpha=ScalarTraits::one(), SC beta=ScalarTraits::zero()) const; - virtual ConstXMapPtr getDomainMap() const; + virtual const ConstXMapPtr getDomainMap() const; - virtual ConstXMapPtr getRangeMap() const; + virtual const ConstXMapPtr getRangeMap() const; virtual void describe(FancyOStream &out, const EVerbosityLevel verbLevel=Describable::verbLevel_default) const; diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_def.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_def.hpp index 45b2d6cfecfd..00506ee70e49 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_def.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_MultiplicativeOperator_def.hpp @@ -150,13 +150,13 @@ namespace FROSch { template - typename MultiplicativeOperator::ConstXMapPtr MultiplicativeOperator::getDomainMap() const + const typename MultiplicativeOperator::ConstXMapPtr MultiplicativeOperator::getDomainMap() const { return OperatorVector_[0]->getDomainMap(); } template - typename MultiplicativeOperator::ConstXMapPtr MultiplicativeOperator::getRangeMap() const + const typename MultiplicativeOperator::ConstXMapPtr MultiplicativeOperator::getRangeMap() const { return OperatorVector_[0]->getRangeMap(); } diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_decl.hpp index a38083ebbecc..7edba1e9ee1a 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_decl.hpp @@ -204,9 +204,9 @@ namespace FROSch { SC alpha=ScalarTraits::one(), SC beta=ScalarTraits::zero()) const = 0; - virtual ConstXMapPtr getDomainMap() const; + virtual const ConstXMapPtr getDomainMap() const; - virtual ConstXMapPtr getRangeMap() const; + virtual const ConstXMapPtr getRangeMap() const; virtual void describe(FancyOStream &out, const EVerbosityLevel verbLevel=Describable::verbLevel_default) const = 0; diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_def.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_def.hpp index 05bda9f7f47c..b765a2d6ada6 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_def.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SchwarzOperator_def.hpp @@ -87,13 +87,13 @@ namespace FROSch { } template - typename SchwarzOperator::ConstXMapPtr SchwarzOperator::getDomainMap() const + const typename SchwarzOperator::ConstXMapPtr SchwarzOperator::getDomainMap() const { return K_->getDomainMap(); } template - typename SchwarzOperator::ConstXMapPtr SchwarzOperator::getRangeMap() const + const typename SchwarzOperator::ConstXMapPtr SchwarzOperator::getRangeMap() const { return K_->getRangeMap(); } diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_decl.hpp index 826e73f922f4..766083e060c5 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_decl.hpp @@ -96,9 +96,9 @@ namespace FROSch { SC alpha=ScalarTraits::one(), SC beta=ScalarTraits::zero()) const; - virtual ConstXMapPtr getDomainMap() const; + virtual const ConstXMapPtr getDomainMap() const; - virtual ConstXMapPtr getRangeMap() const; + virtual const ConstXMapPtr getRangeMap() const; virtual void describe(FancyOStream &out, const EVerbosityLevel verbLevel=Describable::verbLevel_default) const; diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_def.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_def.hpp index 1aaa6910a45e..f7435adddf65 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_def.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzOperators/FROSch_SumOperator_def.hpp @@ -134,13 +134,13 @@ namespace FROSch { } template - typename SumOperator::ConstXMapPtr SumOperator::getDomainMap() const + const typename SumOperator::ConstXMapPtr SumOperator::getDomainMap() const { return OperatorVector_[0]->getDomainMap(); } template - typename SumOperator::ConstXMapPtr SumOperator::getRangeMap() const + const typename SumOperator::ConstXMapPtr SumOperator::getRangeMap() const { return OperatorVector_[0]->getRangeMap(); } diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_decl.hpp index 7b9c651f538f..9effd40154e2 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_decl.hpp @@ -90,9 +90,9 @@ namespace FROSch { SC alpha=ScalarTraits::one(), SC beta=ScalarTraits::zero()) const; - virtual ConstXMapPtr getDomainMap() const; + virtual const ConstXMapPtr getDomainMap() const; - virtual ConstXMapPtr getRangeMap() const; + virtual const ConstXMapPtr getRangeMap() const; virtual void describe(FancyOStream &out, const EVerbosityLevel verbLevel=Describable::verbLevel_default) const; diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_def.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_def.hpp index 6633593a469c..d4cac93b4416 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_def.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_AlgebraicOverlappingPreconditioner_def.hpp @@ -98,13 +98,13 @@ namespace FROSch { } template - typename AlgebraicOverlappingPreconditioner::ConstXMapPtr AlgebraicOverlappingPreconditioner::getDomainMap() const + const typename AlgebraicOverlappingPreconditioner::ConstXMapPtr AlgebraicOverlappingPreconditioner::getDomainMap() const { return K_->getDomainMap(); } template - typename AlgebraicOverlappingPreconditioner::ConstXMapPtr AlgebraicOverlappingPreconditioner::getRangeMap() const + const typename AlgebraicOverlappingPreconditioner::ConstXMapPtr AlgebraicOverlappingPreconditioner::getRangeMap() const { return K_->getRangeMap(); } diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_decl.hpp index 549e2131f85e..7e61f722f571 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_decl.hpp @@ -95,9 +95,9 @@ namespace FROSch { SC alpha=ScalarTraits::one(), SC beta=ScalarTraits::zero()) const; - virtual ConstXMapPtr getDomainMap() const; + virtual const ConstXMapPtr getDomainMap() const; - virtual ConstXMapPtr getRangeMap() const; + virtual const ConstXMapPtr getRangeMap() const; virtual void describe(FancyOStream &out, const EVerbosityLevel verbLevel=Describable::verbLevel_default) const; diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_def.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_def.hpp index 8164621f7e27..d4655129c0dc 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_def.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_OneLevelPreconditioner_def.hpp @@ -142,13 +142,13 @@ namespace FROSch { } template - typename OneLevelPreconditioner::ConstXMapPtr OneLevelPreconditioner::getDomainMap() const + const typename OneLevelPreconditioner::ConstXMapPtr OneLevelPreconditioner::getDomainMap() const { return K_->getDomainMap(); } template - typename OneLevelPreconditioner::ConstXMapPtr OneLevelPreconditioner::getRangeMap() const + const typename OneLevelPreconditioner::ConstXMapPtr OneLevelPreconditioner::getRangeMap() const { return K_->getRangeMap(); } diff --git a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_SchwarzPreconditioner_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_SchwarzPreconditioner_decl.hpp index 70af9b5b7447..62704df22a9c 100644 --- a/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_SchwarzPreconditioner_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SchwarzPreconditioners/FROSch_SchwarzPreconditioner_decl.hpp @@ -129,9 +129,9 @@ namespace FROSch { SC alpha=ScalarTraits::one(), SC beta=ScalarTraits::zero()) const = 0; - virtual ConstXMapPtr getDomainMap() const = 0; + virtual const ConstXMapPtr getDomainMap() const = 0; - virtual ConstXMapPtr getRangeMap() const = 0; + virtual const ConstXMapPtr getRangeMap() const = 0; virtual void describe(FancyOStream &out, const EVerbosityLevel verbLevel=Describable::verbLevel_default) const = 0; diff --git a/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_decl.hpp b/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_decl.hpp index 5b38ceb511b7..2201d98b59c0 100644 --- a/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_decl.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_decl.hpp @@ -112,10 +112,10 @@ namespace FROSch { SC beta=ScalarTraits::zero()) const = 0; //! Get domain map - virtual ConstXMapPtr getDomainMap() const; + virtual const ConstXMapPtr getDomainMap() const; //! Get range map - virtual ConstXMapPtr getRangeMap() const; + virtual const ConstXMapPtr getRangeMap() const; //! Get #IsInitialized_ bool isInitialized() const; diff --git a/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_def.hpp b/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_def.hpp index 345f07e71053..6e7c988598b5 100644 --- a/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_def.hpp +++ b/packages/shylu/shylu_dd/frosch/src/SolverInterfaces/FROSch_Solver_def.hpp @@ -51,13 +51,13 @@ namespace FROSch { using namespace Xpetra; template - typename Solver::ConstXMapPtr Solver::getDomainMap() const + const typename Solver::ConstXMapPtr Solver::getDomainMap() const { return K_->getDomainMap(); } template - typename Solver::ConstXMapPtr Solver::getRangeMap() const + const typename Solver::ConstXMapPtr Solver::getRangeMap() const { return K_->getRangeMap(); } diff --git a/packages/tpetra/CMakeLists.txt b/packages/tpetra/CMakeLists.txt index 1f2cce502261..b7d6d568fe42 100644 --- a/packages/tpetra/CMakeLists.txt +++ b/packages/tpetra/CMakeLists.txt @@ -986,6 +986,9 @@ ENDIF () IF (Tpetra_INST_COMPLEX_DOUBLE AND NOT Tpetra_INST_DOUBLE) MESSAGE (FATAL_ERROR "Tpetra: Tpetra_INST_COMPLEX_DOUBLE is ON, meaning that you want to want to instantiate and/or test Tpetra classes with Scalar = std::complex. However, Tpetra_INST_DOUBLE is OFF. Enabling Scalar = std::complex requires that the corresponding Scalar=T real instantiation be enabled as well.") ENDIF () +IF (Tpetra_INST_COMPLEX_FLOAT AND NOT Tpetra_INST_FLOAT) + MESSAGE (FATAL_ERROR "Tpetra: Tpetra_INST_COMPLEX_FLOAT is ON, meaning that you want to want to instantiate and/or test Tpetra classes with Scalar = std::complex. However, Tpetra_INST_FLOAT is OFF. Enabling Scalar = std::complex requires that the corresponding Scalar=T real instantiation be enabled as well.") +ENDIF () # Tpetra requires that the BLAS work for Scalar, as long as Scalar is # one of the four types (S, D, C, Z) that the BLAS promises to diff --git a/packages/xpetra/src/BlockedCrsMatrix/Xpetra_BlockedCrsMatrix.hpp b/packages/xpetra/src/BlockedCrsMatrix/Xpetra_BlockedCrsMatrix.hpp index ef6a6c7e0aa0..be130a430b48 100644 --- a/packages/xpetra/src/BlockedCrsMatrix/Xpetra_BlockedCrsMatrix.hpp +++ b/packages/xpetra/src/BlockedCrsMatrix/Xpetra_BlockedCrsMatrix.hpp @@ -1066,7 +1066,7 @@ class BlockedCrsMatrix : public Matrix getDomainMap() const { + const RCP getDomainMap() const { XPETRA_MONITOR("XpetraBlockedCrsMatrix::getDomainMap()"); return domainmaps_->getMap(); /*domainmaps_->getFullMap();*/ } @@ -1096,7 +1096,7 @@ class BlockedCrsMatrix : public Matrix getRangeMap() const { + const RCP getRangeMap() const { XPETRA_MONITOR("XpetraBlockedCrsMatrix::getRangeMap()"); return rangemaps_->getMap(); /*rangemaps_->getFullMap();*/ } diff --git a/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp b/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp index 0757b8c0218d..165d3806a1a3 100644 --- a/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp +++ b/packages/xpetra/src/Operator/Xpetra_EpetraOperator.hpp @@ -71,13 +71,13 @@ class EpetraOperator : public Operator { //@{ //! The Map associated with the domain of this operator, which must be compatible with X.getMap(). - virtual Teuchos::RCP > getDomainMap() const { + virtual const Teuchos::RCP > getDomainMap() const { XPETRA_MONITOR("EpetraOperator::getDomainMap()"); return toXpetra(op_->OperatorDomainMap()); } //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual Teuchos::RCP > getRangeMap() const { + virtual const Teuchos::RCP > getRangeMap() const { XPETRA_MONITOR("EpetraOperator::getRangeMap()"); return toXpetra(op_->OperatorRangeMap()); } diff --git a/packages/xpetra/src/Operator/Xpetra_Operator.hpp b/packages/xpetra/src/Operator/Xpetra_Operator.hpp index d1e3ffc975a9..7ce41af4eaad 100644 --- a/packages/xpetra/src/Operator/Xpetra_Operator.hpp +++ b/packages/xpetra/src/Operator/Xpetra_Operator.hpp @@ -62,8 +62,8 @@ template class Operator : virtual public Teuchos::Describable { - typedef Xpetra::Map Map; - typedef Xpetra::MultiVector MultiVector; + typedef Xpetra::Map map_type; + typedef Xpetra::MultiVector mv_type; public: virtual ~Operator() {} @@ -87,10 +87,10 @@ class Operator : virtual public Teuchos::Describable { //@{ //! The Map associated with the domain of this operator, which must be compatible with X.getMap(). - virtual Teuchos::RCP getDomainMap() const = 0; + virtual const Teuchos::RCP getDomainMap() const = 0; //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual Teuchos::RCP getRangeMap() const = 0; + virtual const Teuchos::RCP getRangeMap() const = 0; //! \brief Computes the operator-multivector application. /*! Loosely, performs \f$Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\f$. However, the details of operation @@ -99,7 +99,7 @@ class Operator : virtual public Teuchos::Describable { - if alpha == 0, apply() may short-circuit the operator, so that any values in \c X (including NaNs) are ignored. */ virtual void - apply(const MultiVector& X, MultiVector& Y, + apply(const mv_type& X, mv_type& Y, Teuchos::ETransp mode = Teuchos::NO_TRANS, Scalar alpha = Teuchos::ScalarTraits::one(), Scalar beta = Teuchos::ScalarTraits::zero()) const = 0; @@ -114,12 +114,12 @@ class Operator : virtual public Teuchos::Describable { //@} - virtual void removeEmptyProcessesInPlace(const RCP& /* newMap */) {} + virtual void removeEmptyProcessesInPlace(const RCP& /* newMap */) {} //! Compute a residual R = B - (*this) * X - virtual void residual(const MultiVector& X, - const MultiVector& B, - MultiVector& R) const = 0; + virtual void residual(const mv_type& X, + const mv_type& B, + mv_type& R) const = 0; }; } // namespace Xpetra diff --git a/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp b/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp index ef7790277964..6b36fe66059b 100644 --- a/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp +++ b/packages/xpetra/src/Operator/Xpetra_TpetraOperator.hpp @@ -70,13 +70,13 @@ class TpetraOperator : public Operator > getDomainMap() const { + virtual const Teuchos::RCP > getDomainMap() const { XPETRA_MONITOR("TpetraOperator::getDomainMap()"); return toXpetra(op_->getDomainMap()); } //! The Map associated with the range of this operator, which must be compatible with Y.getMap(). - virtual Teuchos::RCP > getRangeMap() const { + virtual const Teuchos::RCP > getRangeMap() const { XPETRA_MONITOR("TpetraOperator::getRangeMap()"); return toXpetra(op_->getRangeMap()); } diff --git a/packages/xpetra/src/RowMatrix/Xpetra_RowMatrix.hpp b/packages/xpetra/src/RowMatrix/Xpetra_RowMatrix.hpp index fb8ef69d0cbb..0a59f52b5953 100644 --- a/packages/xpetra/src/RowMatrix/Xpetra_RowMatrix.hpp +++ b/packages/xpetra/src/RowMatrix/Xpetra_RowMatrix.hpp @@ -54,6 +54,7 @@ #include #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_Map.hpp" +#include "Xpetra_Operator.hpp" #include "Xpetra_Vector.hpp" namespace Xpetra { @@ -62,7 +63,7 @@ template -class RowMatrix { +class RowMatrix : virtual public Operator { public: typedef Scalar scalar_type; typedef LocalOrdinal local_ordinal_type; diff --git a/packages/xpetra/src/RowMatrix/Xpetra_TpetraRowMatrix.hpp b/packages/xpetra/src/RowMatrix/Xpetra_TpetraRowMatrix.hpp index dd68fe52f81b..f7a88b143903 100644 --- a/packages/xpetra/src/RowMatrix/Xpetra_TpetraRowMatrix.hpp +++ b/packages/xpetra/src/RowMatrix/Xpetra_TpetraRowMatrix.hpp @@ -53,10 +53,8 @@ #include #include "Xpetra_ConfigDefs.hpp" #include "Xpetra_Map.hpp" -#include "Xpetra_RowGraph.hpp" #include "Xpetra_Vector.hpp" -#include "Xpetra_TpetraConfigDefs.hpp" #include "Xpetra_TpetraMap.hpp" #include "Tpetra_RowMatrix.hpp" @@ -71,13 +69,13 @@ template class TpetraRowMatrix - : public RowMatrix { + : virtual public RowMatrix { public: //! @name Destructor Method //@{ //! Destructor. - virtual ~TpetraRowMatrix() {} + virtual ~TpetraRowMatrix() = default; //@} @@ -182,19 +180,36 @@ class TpetraRowMatrix //! Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine. void getLocalRowCopy(LocalOrdinal LocalRow, const Teuchos::ArrayView &Indices, const Teuchos::ArrayView &Values, size_t &NumEntries) const { XPETRA_MONITOR("TpetraRowMatrix::getLocalRowCopy"); - mtx_->getLocalRowCopy(LocalRow, Indices, Values, NumEntries); + typename Tpetra::RowGraph::nonconst_local_inds_host_view_type indices("indices", Indices.size()); + typename Tpetra::RowMatrix::nonconst_values_host_view_type values("values", Values.size()); + + mtx_->getLocalRowCopy(LocalRow, indices, values, NumEntries); + for (size_t i = 0; i < NumEntries; ++i) { + Indices[i] = indices(i); + Values[i] = values(i); + } } //! Extract a const, non-persisting view of global indices in a specified row of the matrix. void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView &indices, ArrayView &values) const { XPETRA_MONITOR("TpetraRowMatrix::getGlobalRowView"); - mtx_->getGlobalRowView(GlobalRow, indices, values); + typename Tpetra::RowGraph::global_inds_host_view_type k_indices; + typename Tpetra::RowMatrix::values_host_view_type k_values; + + mtx_->getGlobalRowView(GlobalRow, k_indices, k_values); + indices = ArrayView(k_indices.data(), k_indices.extent(0)); + values = ArrayView(reinterpret_cast(k_values.data()), k_values.extent(0)); } //! Extract a const, non-persisting view of local indices in a specified row of the matrix. void getLocalRowView(LocalOrdinal LocalRow, ArrayView &indices, ArrayView &values) const { XPETRA_MONITOR("TpetraRowMatrix::getLocalRowView"); - mtx_->getLocalRowView(LocalRow, indices, values); + typename Tpetra::RowGraph::local_inds_host_view_type k_indices; + typename Tpetra::RowMatrix::values_host_view_type k_values; + + mtx_->getLocalRowView(LocalRow, k_indices, k_values); + indices = ArrayView(k_indices.data(), k_indices.extent(0)); + values = ArrayView(reinterpret_cast(k_values.data()), k_values.extent(0)); } //! Get a copy of the diagonal entries owned by this node, with local row indices. @@ -238,10 +253,15 @@ class TpetraRowMatrix //! @name Xpetra specific //@{ + TpetraRowMatrix() = default; + //! TpetraCrsMatrix constructor to wrap a Tpetra::CrsMatrix object TpetraRowMatrix(const Teuchos::RCP > &mtx) : mtx_(mtx) {} + //! Set the underlying Tpetra matrix + void setTpetra_RowMatrix(const Teuchos::RCP > &mtx) { mtx_ = mtx; } + //! Get the underlying Tpetra matrix RCP > getTpetra_RowMatrix() const { return mtx_; } diff --git a/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_decl.hpp b/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_decl.hpp index 206a671de660..cfa773d099ce 100644 --- a/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_decl.hpp +++ b/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_decl.hpp @@ -397,11 +397,11 @@ class CrsMatrixWrap : public Matrix { //! \brief Returns the Map associated with the domain of this operator. //! This will be null until fillComplete() is called. - RCP > getDomainMap() const; + const RCP > getDomainMap() const; //! Returns the Map associated with the domain of this operator. //! This will be null until fillComplete() is called. - RCP > getRangeMap() const; + const RCP > getRangeMap() const; //! \brief Returns the Map that describes the column distribution in this matrix. //! This might be null until fillComplete() is called. diff --git a/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_def.hpp b/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_def.hpp index 1b5f809ee2b6..f43b35843462 100644 --- a/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_def.hpp +++ b/packages/xpetra/sup/Matrix/Xpetra_CrsMatrixWrap_def.hpp @@ -358,12 +358,12 @@ void CrsMatrixWrap::apply(const Multi } template -RCP> CrsMatrixWrap::getDomainMap() const { +const RCP> CrsMatrixWrap::getDomainMap() const { return matrixData_->getDomainMap(); } template -RCP> CrsMatrixWrap::getRangeMap() const { +const RCP> CrsMatrixWrap::getRangeMap() const { return matrixData_->getRangeMap(); }