From d7272c1f04e69cadaad45e7d7df4d65efda89871 Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Fri, 16 Aug 2024 12:50:34 -0600 Subject: [PATCH 1/3] Stratimikos: Silence warning Signed-off-by: Christian Glusa --- .../stratimikos/src/Stratimikos_LinearSolverBuilder_def.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stratimikos/src/Stratimikos_LinearSolverBuilder_def.hpp b/packages/stratimikos/src/Stratimikos_LinearSolverBuilder_def.hpp index f3564e589a66..89c60a096741 100644 --- a/packages/stratimikos/src/Stratimikos_LinearSolverBuilder_def.hpp +++ b/packages/stratimikos/src/Stratimikos_LinearSolverBuilder_def.hpp @@ -88,7 +88,7 @@ LinearSolverBuilder::LinearSolverBuilder( template -LinearSolverBuilder::~LinearSolverBuilder() +LinearSolverBuilder::~LinearSolverBuilder() { #ifdef TEUCHOS_DEBUG // Validate that we read the parameters correctly! From 438d622fbb902ec4b4abde640a53d1f03f1bd6e8 Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Mon, 19 Aug 2024 08:39:25 -0600 Subject: [PATCH 2/3] Panzer: Silence warnings Signed-off-by: Christian Glusa --- .../src/Panzer_STK_LocalMeshUtilities.cpp | 1 - .../Panzer_STK_Quad8ToQuad4MeshFactory.cpp | 6 +++--- .../Panzer_STK_QuadraticToLinearMeshFactory.cpp | 6 +++--- .../disc-fe/src/Panzer_IntegrationValues2.cpp | 14 +++++++------- .../src/Panzer_LocalPartitioningUtilities.cpp | 4 ++-- ...raVector_ReadOnly_GlobalEvaluationData_impl.hpp | 1 - .../Panzer_Integrator_DivBasisTimesScalar.hpp | 5 ----- .../Panzer_Integrator_DivBasisTimesScalar_impl.hpp | 5 ++--- .../MiniEM_FullDarcyPreconditionerFactory.cpp | 4 ---- 9 files changed, 17 insertions(+), 29 deletions(-) diff --git a/packages/panzer/adapters-stk/src/Panzer_STK_LocalMeshUtilities.cpp b/packages/panzer/adapters-stk/src/Panzer_STK_LocalMeshUtilities.cpp index 4c97c28c87d2..0f544cc2fcb2 100644 --- a/packages/panzer/adapters-stk/src/Panzer_STK_LocalMeshUtilities.cpp +++ b/packages/panzer/adapters-stk/src/Panzer_STK_LocalMeshUtilities.cpp @@ -57,7 +57,6 @@ buildGhostedNodes(const Tpetra::Import mvec_type; - typedef typename mvec_type::dual_view_type dual_view_type; size_t owned_cell_cnt = importer.getSourceMap()->getLocalNumElements(); size_t ghstd_cell_cnt = importer.getTargetMap()->getLocalNumElements(); diff --git a/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_Quad8ToQuad4MeshFactory.cpp b/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_Quad8ToQuad4MeshFactory.cpp index fbae814e78a5..b3d0094a6545 100644 --- a/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_Quad8ToQuad4MeshFactory.cpp +++ b/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_Quad8ToQuad4MeshFactory.cpp @@ -205,9 +205,9 @@ void Quad8ToQuad4MeshFactory::buildMetaData(stk::ParallelMachine /* parallelMach if(createEdgeBlocks_) { const CellTopologyData * edge_ctd = shards::CellTopology(ctd).getBaseCellTopologyData(1,0); - std::vector element_block_names; - quad8Mesh_->getElementBlockNames(element_block_names); - for (const auto& block_name : element_block_names) + std::vector element_block_names2; + quad8Mesh_->getElementBlockNames(element_block_names2); + for (const auto& block_name : element_block_names2) mesh.addEdgeBlock(block_name,edgeBlockName_,edge_ctd); } diff --git a/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_QuadraticToLinearMeshFactory.cpp b/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_QuadraticToLinearMeshFactory.cpp index 3daf3d5c96b2..7235d9d4dddc 100644 --- a/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_QuadraticToLinearMeshFactory.cpp +++ b/packages/panzer/adapters-stk/src/stk_interface/Panzer_STK_QuadraticToLinearMeshFactory.cpp @@ -248,9 +248,9 @@ void QuadraticToLinearMeshFactory::buildMetaData(stk::ParallelMachine /* paralle if(createEdgeBlocks_) { const CellTopologyData * edge_ctd = shards::CellTopology(ctd).getBaseCellTopologyData(1,0); - std::vector element_block_names; - quadMesh_->getElementBlockNames(element_block_names); - for (const auto& block_name : element_block_names) + std::vector element_block_names2; + quadMesh_->getElementBlockNames(element_block_names2); + for (const auto& block_name : element_block_names2) mesh.addEdgeBlock(block_name,edgeBlockName_,edge_ctd); } diff --git a/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp b/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp index e897bc787dab..2d0dbecb1d81 100644 --- a/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp +++ b/packages/panzer/disc-fe/src/Panzer_IntegrationValues2.cpp @@ -1721,7 +1721,7 @@ getCubaturePointsRef(const bool cache, const int order = int_rule->getOrder(); // Scratch space for storing the points for each side of the cell - auto side_cub_points = af.template buildStaticArray("side_cub_points",num_points_on_face,cell_dim); + auto side_cub_points2 = af.template buildStaticArray("side_cub_points",num_points_on_face,cell_dim); Intrepid2::DefaultCubatureFactory cubature_factory; @@ -1733,9 +1733,9 @@ getCubaturePointsRef(const bool cache, // Get the cubature for the side if(cell_dim==1){ // In 1D the surface point is either on the left side of the cell, or the right side - auto side_cub_points_host = Kokkos::create_mirror_view(side_cub_points.get_view()); + auto side_cub_points_host = Kokkos::create_mirror_view(side_cub_points2.get_view()); side_cub_points_host(0,0) = (side==0)? -1. : 1.; - Kokkos::deep_copy(side_cub_points.get_view(),side_cub_points_host); + Kokkos::deep_copy(side_cub_points2.get_view(),side_cub_points_host); } else { // Get the face topology from the cell topology @@ -1750,7 +1750,7 @@ getCubaturePointsRef(const bool cache, ic->getCubature(tmp_side_cub_points, tmp_side_cub_weights); // Convert from reference face points to reference cell points - cell_tools.mapToReferenceSubcell(side_cub_points.get_view(), tmp_side_cub_points, subcell_dim, side, cell_topology); + cell_tools.mapToReferenceSubcell(side_cub_points2.get_view(), tmp_side_cub_points, subcell_dim, side, cell_topology); } PHX::Device::execution_space().fence(); @@ -1758,7 +1758,7 @@ getCubaturePointsRef(const bool cache, // Copy from the side allocation to the surface allocation Kokkos::MDRangePolicy> policy({0,0,0},{num_evaluate_cells_,num_points_on_face, num_space_dim}); Kokkos::parallel_for("copy values",policy,KOKKOS_LAMBDA (const int cell,const int point, const int dim) { - aux(cell,point_offset + point,dim) = side_cub_points(point,dim); + aux(cell,point_offset + point,dim) = side_cub_points2(point,dim); }); PHX::Device::execution_space().fence(); } @@ -1770,11 +1770,11 @@ getCubaturePointsRef(const bool cache, "ERROR: 0-D quadrature rule infrastructure does not exist!!! Will not be able to do " << "non-natural integration rules."); - auto cub_points = getUniformCubaturePointsRef(false,force,false); + auto cub_points2 = getUniformCubaturePointsRef(false,force,false); Kokkos::MDRangePolicy> policy({0,0,0},{num_evaluate_cells_,num_ip,num_space_dim}); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const int & cell, const int & ip, const int & dim){ - aux(cell,ip,dim) = cub_points(ip,dim); + aux(cell,ip,dim) = cub_points2(ip,dim); }); } diff --git a/packages/panzer/disc-fe/src/Panzer_LocalPartitioningUtilities.cpp b/packages/panzer/disc-fe/src/Panzer_LocalPartitioningUtilities.cpp index 66a9e44140df..dfe5a935b619 100644 --- a/packages/panzer/disc-fe/src/Panzer_LocalPartitioningUtilities.cpp +++ b/packages/panzer/disc-fe/src/Panzer_LocalPartitioningUtilities.cpp @@ -353,8 +353,8 @@ buildGhostedCellOneRing(const Teuchos::RCP > & comm, // Copy the row for a global node index into a local vector node_to_cell->getGlobalRowCopy(global_node_index,indices,values,numEntries); - for(size_t i=0; iputScalar(0.0); PHX::ExecSpace().fence(); - typedef typename VectorType::dual_view_type::t_dev::memory_space DMS; auto values = ghostedVector_->getLocalViewHost(Tpetra::Access::OverwriteAll); // initialize some ghosted values to the user specified values diff --git a/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar.hpp b/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar.hpp index c0e1d66cb67e..4e7b94e9a1f2 100644 --- a/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar.hpp +++ b/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar.hpp @@ -317,11 +317,6 @@ namespace panzer */ PHX::MDField basis_; - /** - * \brief If set to true, device shared memory will be used. - */ - bool use_shared_memory; - /// Temporary for non-shared calculations PHX::View tmp_; diff --git a/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar_impl.hpp b/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar_impl.hpp index 3fae650a328e..08eb96041f22 100644 --- a/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar_impl.hpp +++ b/packages/panzer/disc-fe/src/evaluators/Panzer_Integrator_DivBasisTimesScalar_impl.hpp @@ -50,8 +50,7 @@ namespace panzer : evalStyle_(evalStyle), multiplier_(multiplier), - basisName_(basis.name()), - use_shared_memory(false) + basisName_(basis.name()) { using PHX::View; using panzer::BASIS; @@ -368,7 +367,7 @@ namespace panzer // Grab the basis information. basis_ = this->wda(workset).bases[basisIndex_]->weighted_div_basis; - use_shared_memory = panzer::HP::inst().useSharedMemory(); + bool use_shared_memory = panzer::HP::inst().useSharedMemory(); if (use_shared_memory) { int bytes; diff --git a/packages/panzer/mini-em/src/solvers/MiniEM_FullDarcyPreconditionerFactory.cpp b/packages/panzer/mini-em/src/solvers/MiniEM_FullDarcyPreconditionerFactory.cpp index c8fb491c06e1..d3bd6fb43720 100644 --- a/packages/panzer/mini-em/src/solvers/MiniEM_FullDarcyPreconditionerFactory.cpp +++ b/packages/panzer/mini-em/src/solvers/MiniEM_FullDarcyPreconditionerFactory.cpp @@ -156,10 +156,6 @@ Teko::LinearOp FullDarcyPreconditionerFactory::buildPreconditionerOperator(Teko: Teko::LinearOp diffK; if (useTpetra) { - typedef panzer::TpetraNodeType Node; - typedef int LocalOrdinal; - typedef panzer::GlobalOrdinal GlobalOrdinal; - RCP > tOp = rcp_dynamic_cast >(K2,true); RCP > tOp2 = Teuchos::rcp_const_cast>(tOp); RCP > crsOp = rcp_dynamic_cast >(tOp2->getTpetraOperator(),true); From fef0dc0198991ba83f484f750e0df00ade999516 Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Fri, 16 Aug 2024 12:57:46 -0600 Subject: [PATCH 3/3] Piro: Silence warning Signed-off-by: Christian Glusa --- packages/piro/src/Piro_ThyraProductME_Constraint_SimOpt.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/piro/src/Piro_ThyraProductME_Constraint_SimOpt.hpp b/packages/piro/src/Piro_ThyraProductME_Constraint_SimOpt.hpp index 3f39d6bb15a4..e364868016e4 100644 --- a/packages/piro/src/Piro_ThyraProductME_Constraint_SimOpt.hpp +++ b/packages/piro/src/Piro_ThyraProductME_Constraint_SimOpt.hpp @@ -207,7 +207,6 @@ class ThyraProductME_Constraint_SimOpt : public ROL::Constraint_SimOpt { } } else { - Thyra::ModelEvaluatorBase::Derivative dfdp_dv = outArgs.get_DfDp(0); auto dfdp_op = dfdp_dv.getLinearOp(); auto dfdp = dfdp_dv.getMultiVector();