Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STK: Snapshot 12-11-24 05:47 from Sierra 5.23.2-380-ge11e3166 #13667

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/stk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

5.23.2 (STK_VERSION 5230200) 12/11/2024
misc fixes for AMD/ROCm (ATS-4)
stk_mesh: speedup for device-field multi-state rotation
reduce stacksize (sizeof(DeviceMesh)) from ~2900 to ~470
stk_search: misc fixes
stk_io: add query for existence of fields on database

5.21.6-1 (STK_VERSION 5210601) 10/31/2024
stk_mesh, stk_search: more fixes for HIP unified and Cuda no-uvm builds

Expand Down
8 changes: 3 additions & 5 deletions packages/stk/stk_doc_tests/stk_mesh/howToNgp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,12 @@ void run_connected_face_test(const stk::mesh::BulkData& bulk)
typedef stk::ngp::TeamPolicy<stk::mesh::NgpMesh::MeshExecSpace>::member_type TeamHandleType;
const auto& teamPolicy = stk::ngp::TeamPolicy<stk::mesh::NgpMesh::MeshExecSpace>(ngpMesh.num_buckets(stk::topology::ELEM_RANK),
Kokkos::AUTO);

Kokkos::parallel_for(teamPolicy,
KOKKOS_LAMBDA(const TeamHandleType& team)
{
const stk::mesh::NgpMesh::BucketType& bucket = ngpMesh.get_bucket(stk::topology::ELEM_RANK,
team.league_rank());
unsigned numElems = bucket.size();
const unsigned numElems = bucket.size();

Kokkos::parallel_for(Kokkos::TeamThreadRange(team, 0u, numElems), [&] (const int& i)
{
Expand Down Expand Up @@ -409,9 +408,8 @@ void run_connected_face_test(const stk::mesh::BulkData& bulk)

TEST_F(NgpHowTo, loopOverElemFaces)
{
if (stk::parallel_machine_size(MPI_COMM_WORLD) > 1) {
GTEST_SKIP();
}
if (stk::parallel_machine_size(MPI_COMM_WORLD) > 1) { GTEST_SKIP(); }

setup_empty_mesh(stk::mesh::BulkData::NO_AUTO_AURA);
auto &field = get_meta().declare_field<double>(stk::topology::NODE_RANK, "myField");
stk::mesh::put_field_on_mesh(field, get_meta().universal_part(), nullptr);
Expand Down
8 changes: 4 additions & 4 deletions packages/stk/stk_doc_tests/stk_topology/shell_sides.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ TEST(stk_topology, shell_side_topology) {
EXPECT_EQ(shell.num_sides(),6u);
EXPECT_EQ(shell.side_topology(0), stk::topology::QUAD_4);
EXPECT_EQ(shell.side_topology(1), stk::topology::QUAD_4);
EXPECT_EQ(shell.side_topology(2), stk::topology::SHELL_SIDE_BEAM_2);
EXPECT_EQ(shell.side_topology(3), stk::topology::SHELL_SIDE_BEAM_2);
EXPECT_EQ(shell.side_topology(4), stk::topology::SHELL_SIDE_BEAM_2);
EXPECT_EQ(shell.side_topology(5), stk::topology::SHELL_SIDE_BEAM_2);
EXPECT_EQ(shell.side_topology(2), stk::topology::LINE_2);
EXPECT_EQ(shell.side_topology(3), stk::topology::LINE_2);
EXPECT_EQ(shell.side_topology(4), stk::topology::LINE_2);
EXPECT_EQ(shell.side_topology(5), stk::topology::LINE_2);
}
//end_shell_side_topo

Expand Down
6 changes: 5 additions & 1 deletion packages/stk/stk_expreval/stk_expreval/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ double& Node::setResult() {
void
Node::eval()
{
stk::util::clear_fp_errors();
if (m_owner->get_fp_error_behavior() != Eval::FPErrorBehavior::Ignore)
{
stk::util::clear_fp_errors();
}

switch (m_opcode) {
case OPCODE_STATEMENT: {
setResult() = m_left->getResult();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2002 - 2008, 2010, 2011 National Technology Engineering
// Solutions of Sandia, LLC (NTESS). Under the terms of Contract
// DE-NA0003525 with NTESS, the U.S. Government retains certain rights
// in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
// * Neither the name of NTESS nor the names of its contributors
// may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//

#include <gtest/gtest.h>
#include <stk_mesh/base/BulkData.hpp>
#include <stk_mesh/base/MeshBuilder.hpp>
#include <stk_io/FillMesh.hpp>
#include <stk_search/LocalCoarseSearch.hpp>
#include <stk_unit_test_utils/Search_UnitTestUtils.hpp>
#include <stk_unit_test_utils/MeshUtilsForBoundingVolumes.hpp>
#include <stk_unit_test_utils/getOption.h>

namespace
{

TEST(StkSearch, NGP_coarse_search_mesh_elem_boxes_MORTON)
{
using ExecSpace = Kokkos::DefaultExecutionSpace;
MPI_Comm comm = MPI_COMM_WORLD;
if (stk::parallel_machine_size(comm) != 1) { GTEST_SKIP(); }

stk::mesh::MeshBuilder builder(comm);
std::shared_ptr<stk::mesh::BulkData> bulkPtr = builder.create();

stk::io::fill_mesh("generated:1x9x19|sideset:xXyYzZ", *bulkPtr);

Kokkos::View<FloatBoxIdent*, ExecSpace> elemBoxes =
createBoundingBoxesForEntities<FloatBoxIdent>(*bulkPtr, stk::topology::ELEM_RANK);
Kokkos::View<FloatBoxIdent*, ExecSpace> faceBoxes =
createBoundingBoxesForEntities<FloatBoxIdent>(*bulkPtr, stk::topology::FACE_RANK);

std::cout<<"Num elem-boxes: "<<elemBoxes.size()<<", num face-boxes: "<<faceBoxes.size()<<std::endl;

stk::search::SearchMethod searchMethod = stk::search::MORTON_LBVH;
Kokkos::View<IdentIntersection*, ExecSpace> searchResults;
stk::search::local_coarse_search(elemBoxes, faceBoxes, searchMethod, searchResults, ExecSpace{});

const size_t expectedSize = 2910;
EXPECT_EQ(expectedSize, searchResults.size())<<"expected results size: "<<expectedSize<<", actual results size: "<<searchResults.size();
}

}
Loading
Loading