From 2d911781ef861c87167cf7ba042efb0f90eb500c Mon Sep 17 00:00:00 2001 From: Irina Tezaur Date: Thu, 9 Nov 2023 13:39:46 -0700 Subject: [PATCH 1/2] Fixes to prevent compilation errors in Albany warning-free build. --- src/Omega_h_int_scan.cpp | 3 ++- src/Omega_h_rcFields.cpp | 1 - src/Omega_h_vtk.cpp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Omega_h_int_scan.cpp b/src/Omega_h_int_scan.cpp index a88ee37f5..b97c2fa47 100644 --- a/src/Omega_h_int_scan.cpp +++ b/src/Omega_h_int_scan.cpp @@ -27,7 +27,8 @@ LOs offset_scan(Read a, std::string const& name) { out.set(0, 0); #if defined(OMEGA_H_USE_KOKKOS) auto outSub = Kokkos::subview(out.view(),std::make_pair(1,out.size())); - assert(outSub.size()==a.size()); + LO outSub_size = outSub.size(); + assert(outSub_size==a.size()); auto kkOp = i32Plus(); Kokkos::Experimental::inclusive_scan("omegah_kk_offset_scan", ExecSpace(), a.view(), outSub, kkOp, LO()); Kokkos::fence(); diff --git a/src/Omega_h_rcFields.cpp b/src/Omega_h_rcFields.cpp index f2220aba2..920eee741 100644 --- a/src/Omega_h_rcFields.cpp +++ b/src/Omega_h_rcFields.cpp @@ -265,7 +265,6 @@ Read Mesh::get_rc_mesh_array_from_rc_array( auto rc_ids = class_ids.exists() ? (ask_revClass(ent_dim, class_ids)).ab2b : (ask_revClass(ent_dim)).ab2b; - auto class_id_size = class_ids.exists() ? class_ids.size() : -1; auto n_bEnts = rc_ids.size(); OMEGA_H_CHECK(rc_field.size() == n_bEnts * ncomps); if ((ent_dim == 3) && (n_bEnts != n_ents)) { diff --git a/src/Omega_h_vtk.cpp b/src/Omega_h_vtk.cpp index 1d4157283..9dfcc2d09 100644 --- a/src/Omega_h_vtk.cpp +++ b/src/Omega_h_vtk.cpp @@ -301,7 +301,6 @@ void write_tag_impl( void write_tag(std::ostream& stream, TagBase const* tag, Int space_dim, Int ent_dim, Mesh* mesh, bool compress) { OMEGA_H_TIME_FUNCTION; - const auto ncomps = tag->ncomps(); const auto name = tag->name(); const auto class_ids = tag->class_ids(); // TODO: write class id info for rc tag to file From 4a9ef03c117fc805ea9f25d20522e09a637b4876 Mon Sep 17 00:00:00 2001 From: Irina Tezaur Date: Thu, 9 Nov 2023 15:03:06 -0700 Subject: [PATCH 2/2] Implementing change suggested by Luca. --- src/Omega_h_int_scan.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Omega_h_int_scan.cpp b/src/Omega_h_int_scan.cpp index b97c2fa47..fa88d75b3 100644 --- a/src/Omega_h_int_scan.cpp +++ b/src/Omega_h_int_scan.cpp @@ -27,8 +27,7 @@ LOs offset_scan(Read a, std::string const& name) { out.set(0, 0); #if defined(OMEGA_H_USE_KOKKOS) auto outSub = Kokkos::subview(out.view(),std::make_pair(1,out.size())); - LO outSub_size = outSub.size(); - assert(outSub_size==a.size()); + assert(static_cast(outSub.size())==a.size()); auto kkOp = i32Plus(); Kokkos::Experimental::inclusive_scan("omegah_kk_offset_scan", ExecSpace(), a.view(), outSub, kkOp, LO()); Kokkos::fence();