From 4641f385a38ae9d6599cd7c8bd81f58485b341b8 Mon Sep 17 00:00:00 2001 From: Paul Wolfenbarger Date: Tue, 15 Jun 2021 13:46:30 -0600 Subject: [PATCH 1/3] New proxy setting to match the change Friday --- cmake/std/PullRequestLinuxDriver-old.sh | 4 ++-- cmake/std/PullRequestLinuxDriver.sh | 4 ++-- cmake/std/common.bash | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/std/PullRequestLinuxDriver-old.sh b/cmake/std/PullRequestLinuxDriver-old.sh index faf78ef9caef..918ea282ba14 100755 --- a/cmake/std/PullRequestLinuxDriver-old.sh +++ b/cmake/std/PullRequestLinuxDriver-old.sh @@ -20,8 +20,8 @@ # and we get the correct behavior for PR testing. # -export https_proxy=http://wwwproxy.sandia.gov:80 -export http_proxy=http://wwwproxy.sandia.gov:80 +export https_proxy=http://proxy.sandia.gov:80 +export http_proxy=http://proxy.sandia.gov:80 no_proxy='localhost,localnets,.sandia.gov,127.0.0.1,169.254.0.0/16,forge.sandia.gov' whoami diff --git a/cmake/std/PullRequestLinuxDriver.sh b/cmake/std/PullRequestLinuxDriver.sh index ae8d160ea9e5..8633435bcca5 100755 --- a/cmake/std/PullRequestLinuxDriver.sh +++ b/cmake/std/PullRequestLinuxDriver.sh @@ -68,8 +68,8 @@ function bootstrap_modules() { print_banner "PullRequestLinuxDriver.sh" # Set up Sandia PROXY environment vars -export https_proxy=http://wwwproxy.sandia.gov:80 -export http_proxy=http://wwwproxy.sandia.gov:80 +export https_proxy=http://proxy.sandia.gov:80 +export http_proxy=http://proxy.sandia.gov:80 export no_proxy='localhost,localnets,127.0.0.1,169.254.0.0/16,forge.sandia.gov' diff --git a/cmake/std/common.bash b/cmake/std/common.bash index 103602b88569..f732fdc1ad18 100644 --- a/cmake/std/common.bash +++ b/cmake/std/common.bash @@ -182,7 +182,7 @@ function get_md5sum() { # # get_pip_args=( # --user -# --proxy="http://user:nopass@wwwproxy.sandia.gov:80" +# --proxy="http://user:nopass@proxy.sandia.gov:80" # --no-setuptools # --no-wheel # ) From c8b9af07cb42c914c600a62c73ef3f276adb5cf6 Mon Sep 17 00:00:00 2001 From: Paul Wolfenbarger Date: Wed, 16 Jun 2021 15:17:27 -0600 Subject: [PATCH 2/3] Add .sandia.gov bacj into the no_proxy variable --- cmake/std/PullRequestLinuxDriver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/std/PullRequestLinuxDriver.sh b/cmake/std/PullRequestLinuxDriver.sh index 8633435bcca5..ca06a3602326 100755 --- a/cmake/std/PullRequestLinuxDriver.sh +++ b/cmake/std/PullRequestLinuxDriver.sh @@ -70,7 +70,7 @@ print_banner "PullRequestLinuxDriver.sh" # Set up Sandia PROXY environment vars export https_proxy=http://proxy.sandia.gov:80 export http_proxy=http://proxy.sandia.gov:80 -export no_proxy='localhost,localnets,127.0.0.1,169.254.0.0/16,forge.sandia.gov' +export no_proxy='localhost,.sandia.gov,localnets,127.0.0.1,169.254.0.0/16,forge.sandia.gov' # bootstrap the python and git modules for this system From af2d845d8370da9056bb96963624e397f711e4ff Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Fri, 30 Jul 2021 15:09:34 +0200 Subject: [PATCH 3/3] Update MueLu's GetMatrixDiagonal function (Kokkos version), to return Xpetra::Vector --- .../src/Utils/MueLu_Utilities_kokkos_decl.hpp | 15 ++++-- .../src/Utils/MueLu_Utilities_kokkos_def.hpp | 47 ++++++------------- 2 files changed, 24 insertions(+), 38 deletions(-) diff --git a/packages/muelu/src/Utils/MueLu_Utilities_kokkos_decl.hpp b/packages/muelu/src/Utils/MueLu_Utilities_kokkos_decl.hpp index cfb119b47f3c..88877699ad81 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities_kokkos_decl.hpp +++ b/packages/muelu/src/Utils/MueLu_Utilities_kokkos_decl.hpp @@ -160,11 +160,11 @@ namespace MueLu { /*! @brief Extract Matrix Diagonal - Returns Matrix diagonal in ArrayRCP. + Returns Matrix diagonal in RCP. NOTE -- it's assumed that A has been fillComplete'd. */ - static Teuchos::ArrayRCP GetMatrixDiagonal(const Matrix& A); // FIXME + static RCP GetMatrixDiagonal(const Matrix& A); // FIXME /*! @brief Extract Matrix Diagonal @@ -271,7 +271,7 @@ namespace MueLu { static void ZeroDirichletRows(RCP& X, const Kokkos::View& dirichletRows, SC replaceWith=Teuchos::ScalarTraits::zero()); static void ZeroDirichletCols(RCP& A, const Kokkos::View& dirichletCols, SC replaceWith=Teuchos::ScalarTraits::zero()); - + static void ApplyRowSumCriterion(const Matrix& A, const typename Teuchos::ScalarTraits::magnitudeType rowSumTol, Kokkos::View & dirichletRows); @@ -382,8 +382,13 @@ namespace MueLu { #endif static RCP > Crs2Op(RCP Op) { return Utilities::Crs2Op(Op); } - static ArrayRCP GetMatrixDiagonal(const Matrix& A) { - return UtilitiesBase::GetMatrixDiagonal(A); + static RCP GetMatrixDiagonal(const Matrix& A) { + const auto rowMap = A.getRowMap(); + auto diag = Xpetra::VectorFactory::Build(rowMap,true); + + A.getLocalDiagCopy(*diag); + + return diag; } static RCP GetMatrixDiagonalInverse(const Matrix& A, Magnitude tol = Teuchos::ScalarTraits::eps()*100, const bool doLumped=false) { return UtilitiesBase::GetMatrixDiagonalInverse(A, tol, doLumped); diff --git a/packages/muelu/src/Utils/MueLu_Utilities_kokkos_def.hpp b/packages/muelu/src/Utils/MueLu_Utilities_kokkos_def.hpp index 62261804f51b..4df91f9ca942 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities_kokkos_def.hpp +++ b/packages/muelu/src/Utils/MueLu_Utilities_kokkos_def.hpp @@ -112,30 +112,13 @@ namespace MueLu { template - Teuchos::ArrayRCP Utilities_kokkos:: + Teuchos::RCP > + Utilities_kokkos:: GetMatrixDiagonal(const Matrix& A) { - // FIXME_KOKKOS + const auto rowMap = A.getRowMap(); + auto diag = Xpetra::VectorFactory::Build(rowMap, true); - size_t numRows = A.getRowMap()->getNodeNumElements(); - Teuchos::ArrayRCP diag(numRows); - - Teuchos::ArrayView cols; - Teuchos::ArrayView vals; - for (size_t i = 0; i < numRows; ++i) { - A.getLocalRowView(i, cols, vals); - - LO j = 0; - for (; j < cols.size(); ++j) { - if (Teuchos::as(cols[j]) == i) { - diag[i] = vals[j]; - break; - } - } - if (j == cols.size()) { - // Diagonal entry is absent - diag[i] = Teuchos::ScalarTraits::zero(); - } - } + A.getLocalDiagCopy(*diag); return diag; } //GetMatrixDiagonal @@ -226,11 +209,9 @@ namespace MueLu { crsOp->getLocalDiagCopy(*localDiag,offsets()); } else { - ArrayRCP localDiagVals = localDiag->getDataNonConst(0); - Teuchos::ArrayRCP diagVals = GetMatrixDiagonal(A); - for (LO i = 0; i < localDiagVals.size(); i++) - localDiagVals[i] = diagVals[i]; - localDiagVals = diagVals = null; + auto localDiagVals = localDiag->getDeviceLocalView(Xpetra::Access::ReadWrite); + const auto diagVals = GetMatrixDiagonal(A)->getDeviceLocalView(Xpetra::Access::ReadOnly); + Kokkos::deep_copy(localDiagVals, diagVals); } RCP diagonal = VectorFactory::Build(colMap); @@ -612,7 +593,7 @@ namespace MueLu { return MueLu::ZeroDirichletCols(A, dirichletCols, replaceWith); } - // Applies rowsum criterion + // Applies rowsum criterion template void ApplyRowSumCriterion(const Xpetra::Matrix& A, const typename Teuchos::ScalarTraits::magnitudeType rowSumTol, @@ -711,7 +692,7 @@ namespace MueLu { (localGraph.row_map, localGraph.entries); - RCP > retval = + RCP > retval = Xpetra::VectorFactory::Build(Op.getRowMap()); // Copy out and reorder data @@ -723,7 +704,7 @@ namespace MueLu { }); return retval; } - + template Teuchos::RCP > CuthillMcKee(const Xpetra::Matrix &Op) { using local_matrix_type = typename Xpetra::Matrix::local_matrix_type; @@ -740,7 +721,7 @@ namespace MueLu { (localGraph.row_map, localGraph.entries); - RCP > retval = + RCP > retval = Xpetra::VectorFactory::Build(Op.getRowMap()); // Copy out data @@ -761,7 +742,7 @@ namespace MueLu { } template - Teuchos::RCP > + Teuchos::RCP > Utilities_kokkos::ReverseCuthillMcKee(const Matrix &Op) { return MueLu::ReverseCuthillMcKee(Op); } @@ -773,7 +754,7 @@ namespace MueLu { } template - Teuchos::RCP > + Teuchos::RCP > Utilities_kokkos::CuthillMcKee(const Matrix &Op) { return MueLu::CuthillMcKee(Op); }