Skip to content

Commit

Permalink
Merge Pull Request #13426 from trilinos/Trilinos/stk-snapshot
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'STK: Snapshot 09-04-24 16:01 from Sierra 5.21.3-843-gf6bffc7c'
PR Author: alanw0
  • Loading branch information
trilinos-autotester authored Sep 6, 2024
2 parents 09dac29 + cc74003 commit 002d398
Show file tree
Hide file tree
Showing 38 changed files with 1,863 additions and 452 deletions.
3 changes: 3 additions & 0 deletions packages/stk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

5.21.4-1 (STK_VERSION 5210401) 9/04/2024
Fix cmake configuration errors that occurred on AMD MI300A platform

5.21.4 (STK_VERSION 5210400) 8/29/2024
minor fixes, no signficant API changes

Expand Down
2 changes: 1 addition & 1 deletion packages/stk/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SET(SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
Middle_mesh stk_middle_mesh EX OPTIONAL
Transfer stk_transfer PT OPTIONAL
Mesh stk_mesh PT OPTIONAL
SearchUtil stk_search_util EX OPTIONAL
SearchUtil stk_search_util PT OPTIONAL
TransferUtil stk_transfer_util EX OPTIONAL
IO stk_io PT OPTIONAL
Middle_mesh_util stk_middle_mesh_util EX OPTIONAL
Expand Down
24 changes: 24 additions & 0 deletions packages/stk/stk_balance/stk_balance/balanceUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,24 @@ int GraphCreationSettings::getGraphVertexWeight(stk::topology type) const
return 4;
case stk::topology::SHELL_TRI_6:
return 8;
case stk::topology::SHELL_TRI_3_ALL_FACE_SIDES:
return 3;
case stk::topology::SHELL_TRI_4_ALL_FACE_SIDES:
return 4;
case stk::topology::SHELL_TRI_6_ALL_FACE_SIDES:
return 8;
case stk::topology::SHELL_QUAD_4:
return 6;
case stk::topology::SHELL_QUAD_8:
return 8;
case stk::topology::SHELL_QUAD_9:
return 9;
case stk::topology::SHELL_QUAD_4_ALL_FACE_SIDES:
return 6;
case stk::topology::SHELL_QUAD_8_ALL_FACE_SIDES:
return 8;
case stk::topology::SHELL_QUAD_9_ALL_FACE_SIDES:
return 9;
case stk::topology::TET_4:
return 1;
case stk::topology::TET_8:
Expand Down Expand Up @@ -680,8 +692,11 @@ int GraphCreationSettings::getConnectionTableIndex(stk::topology elementTopology
case stk::topology::TRI_4_2D:
case stk::topology::QUAD_4_2D:
case stk::topology::SHELL_TRI_3:
case stk::topology::SHELL_TRI_3_ALL_FACE_SIDES:
case stk::topology::SHELL_TRI_4:
case stk::topology::SHELL_TRI_4_ALL_FACE_SIDES:
case stk::topology::SHELL_QUAD_4:
case stk::topology::SHELL_QUAD_4_ALL_FACE_SIDES:
tableIndex = 2;
break;
case stk::topology::TET_4:
Expand All @@ -694,8 +709,11 @@ int GraphCreationSettings::getConnectionTableIndex(stk::topology elementTopology
case stk::topology::QUAD_8_2D:
case stk::topology::QUAD_9_2D:
case stk::topology::SHELL_TRI_6:
case stk::topology::SHELL_TRI_6_ALL_FACE_SIDES:
case stk::topology::SHELL_QUAD_8:
case stk::topology::SHELL_QUAD_8_ALL_FACE_SIDES:
case stk::topology::SHELL_QUAD_9:
case stk::topology::SHELL_QUAD_9_ALL_FACE_SIDES:
tableIndex = 4;
break;
case stk::topology::TET_8:
Expand Down Expand Up @@ -746,8 +764,11 @@ int GraphCreationSettings::getEdgeWeightTableIndex(stk::topology elementTopology
case stk::topology::TRI_4_2D:
case stk::topology::QUAD_4_2D:
case stk::topology::SHELL_TRI_3:
case stk::topology::SHELL_TRI_3_ALL_FACE_SIDES:
case stk::topology::SHELL_TRI_4:
case stk::topology::SHELL_TRI_4_ALL_FACE_SIDES:
case stk::topology::SHELL_QUAD_4:
case stk::topology::SHELL_QUAD_4_ALL_FACE_SIDES:
tableIndex = 2;
break;
case stk::topology::TET_4:
Expand All @@ -762,10 +783,13 @@ int GraphCreationSettings::getEdgeWeightTableIndex(stk::topology elementTopology
case stk::topology::QUAD_8_2D:
case stk::topology::QUAD_9_2D:
case stk::topology::SHELL_TRI_6:
case stk::topology::SHELL_TRI_6_ALL_FACE_SIDES:
case stk::topology::SHELL_QUAD_9:
case stk::topology::SHELL_QUAD_9_ALL_FACE_SIDES:
tableIndex = 5;
break;
case stk::topology::SHELL_QUAD_8:
case stk::topology::SHELL_QUAD_8_ALL_FACE_SIDES:
case stk::topology::TET_8:
case stk::topology::TET_10:
case stk::topology::TET_11:
Expand Down
10 changes: 6 additions & 4 deletions packages/stk/stk_doc_tests/stk_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ else()
add_test(NAME "stk_io_doc_tests" COMMAND stk_io_doc_tests)
endif()

target_include_directories(stk_io_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
if(TARGET stk_io_doc_tests)
target_include_directories(stk_io_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
endif()
10 changes: 6 additions & 4 deletions packages/stk/stk_doc_tests/stk_mesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ else()
add_test("stk_mesh_doc_tests" sh -c "mpiexec --np 1 ${CMAKE_CURRENT_BINARY_DIR}/stk_mesh_doc_tests --gtest_filter=StkMeshHowTo.iterate*")
endif()

target_include_directories(stk_mesh_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
if(TARGET stk_mesh_doc_tests)
target_include_directories(stk_mesh_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
endif()

10 changes: 6 additions & 4 deletions packages/stk/stk_doc_tests/stk_middle_mesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ else()
add_test(NAME "stk_middle_mesh_doc_tests" COMMAND stk_middle_mesh_doc_tests)
endif()

target_include_directories(stk_middle_mesh_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
if(TARGET stk_middle_mesh_doc_tests)
target_include_directories(stk_middle_mesh_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
endif()
10 changes: 6 additions & 4 deletions packages/stk/stk_doc_tests/stk_search/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ else()
add_test(NAME "stk_search_doc_tests" COMMAND stk_search_doc_tests)
endif()

target_include_directories(stk_search_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
if(TARGET stk_search_doc_tests)
target_include_directories(stk_search_doc_tests PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
endif()
10 changes: 6 additions & 4 deletions packages/stk/stk_doc_tests/stk_simd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ else()
target_link_libraries(stk_simd_doc_test stk_unit_main)
endif()

target_include_directories(stk_simd_doc_test PRIVATE
$<BUILD_INTERFACE:${STK_TOPLEVEL_SOURCE_DIR}/stk_simd>
$<INSTALL_INTERFACE:include>
)
if(TARGET stk_simd_doc_test)
target_include_directories(stk_simd_doc_test PRIVATE
$<BUILD_INTERFACE:${STK_TOPLEVEL_SOURCE_DIR}/stk_simd>
$<INSTALL_INTERFACE:include>
)
endif()
9 changes: 9 additions & 0 deletions packages/stk/stk_expreval/stk_expreval/Function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ enum class FunctionType {
UNDEFINED
};

constexpr bool is_function_supported_on_device(FunctionType type)
{
return type != FunctionType::RAND &&
type != FunctionType::SRAND &&
type != FunctionType::RANDOM &&
type != FunctionType::TIME &&
type != FunctionType::UNDEFINED;
}

KOKKOS_INLINE_FUNCTION
double cycloidal_ramp(double t, double t1, double t2)
{
Expand Down
15 changes: 15 additions & 0 deletions packages/stk/stk_expreval/stk_expreval/ParsedEval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define PARSEDEVAL_HPP

#include "Kokkos_Core.hpp"
#include "stk_expreval/Function.hpp"
#include "stk_util/ngp/NgpSpaces.hpp"
#include "stk_expreval/Eval.hpp"
#include "stk_expreval/ParsedEvalBase.hpp"
Expand Down Expand Up @@ -80,6 +81,20 @@ class ParsedEval : public ParsedEvalBase

virtual int get_result_buffer_size() override { return RESULT_BUFFER_SIZE; }

void check_for_errors(bool will_run_on_device) const override
{
for (size_t i=0; i < m_hostNodes.size(); ++i)
{
const NgpNode& node = m_hostNodes(i);
if (node.m_opcode == OPCODE_FUNCTION)
{
FunctionType funcType = node.m_data.function.functionType;
STK_ThrowRequireMsg(funcType != FunctionType::UNDEFINED, "user defined functions are not supported by ParsedEval");
STK_ThrowRequireMsg(will_run_on_device && is_function_supported_on_device(funcType), "random number generation and time functions not supported on device");
}
}
}

KOKKOS_INLINE_FUNCTION
int get_num_variables() const { return m_numVariables; }

Expand Down
2 changes: 2 additions & 0 deletions packages/stk/stk_expreval/stk_expreval/ParsedEvalBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class ParsedEvalBase
KOKKOS_DEFAULTED_FUNCTION virtual ~ParsedEvalBase() = default;

virtual int get_result_buffer_size() = 0;

virtual void check_for_errors(bool will_run_on_device) const = 0;
};

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if [ $? -ne 0 ] ; then
fi

printf "Now building trilinos/stk using make...\n";
exe "make VERBOSE=1 -j8 >& ${stk_make_log}";
exe "make VERBOSE=1 -j16 >& ${stk_make_log}";
if [ $? -ne 0 ] ; then
echo "!! error in make, check output in ${stk_make_log} !!";
exit 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fi
fi

printf "Now building trilinos/stk using make...\n";
exe "make VERBOSE=1 -j8 >& ${stk_make_log}";
exe "make VERBOSE=1 -j16 >& ${stk_make_log}";
if [ $? -ne 0 ] ; then
echo "!! error in make, check output in ${stk_make_log} !!";
exit 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ cmake \
-DKokkos_ARCH_VOLTA70=${cuda_on_or_off} \
-DTpetra_ENABLE_CUDA:BOOL=${cuda_on_or_off} \
-DSTK_ENABLE_TESTS:BOOL=ON \
-DTrilinos_ENABLE_Intrepid2:BOOL=ON \
-DTrilinos_ENABLE_STK:BOOL=ON \
-DTrilinos_ENABLE_STKMesh:BOOL=ON \
-DTrilinos_ENABLE_STKIO:BOOL=OFF \
Expand Down
40 changes: 35 additions & 5 deletions packages/stk/stk_mesh/stk_mesh/base/MetaData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,16 @@ void MetaData::internal_declare_known_cell_topology_parts()
register_topology(stk::topology::SHELL_TRI_3);
register_topology(stk::topology::SHELL_TRI_6);

register_topology(stk::topology::SHELL_TRI_3_ALL_FACE_SIDES);
register_topology(stk::topology::SHELL_TRI_6_ALL_FACE_SIDES);

register_topology(stk::topology::SHELL_QUAD_4);
register_topology(stk::topology::SHELL_QUAD_8);
register_topology(stk::topology::SHELL_QUAD_9);

register_topology(stk::topology::SHELL_QUAD_4_ALL_FACE_SIDES);
register_topology(stk::topology::SHELL_QUAD_8_ALL_FACE_SIDES);
register_topology(stk::topology::SHELL_QUAD_9_ALL_FACE_SIDES);
}
}

Expand Down Expand Up @@ -1261,22 +1268,32 @@ stk::topology get_topology( shards::CellTopology shards_topology, unsigned spati
//else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::Spring<3> >()) )
// t = stk::topology::SPRING_3;

else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellTriangle<3> >()) )
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellTriangle<3> >()) ) {
t = stk::topology::SHELL_TRI_3;
// t = stk::topology::SHELL_TRI_3_ALL_FACE_SIDES;
}

//NOTE: shards does not define a shell triangle 4
//else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellTriangle<4> >()) )
// t = stk::topology::SHELL_TRI_4;

else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellTriangle<6> >()) )
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellTriangle<6> >()) ) {
t = stk::topology::SHELL_TRI_6;
// t = stk::topology::SHELL_TRI_6_ALL_FACE_SIDES;
}

else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellQuadrilateral<4> >()) )
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellQuadrilateral<4> >()) ) {
t = stk::topology::SHELL_QUAD_4;
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellQuadrilateral<8> >()) )
// t = stk::topology::SHELL_QUAD_4_ALL_FACE_SIDES;
}
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellQuadrilateral<8> >()) ) {
t = stk::topology::SHELL_QUAD_8;
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellQuadrilateral<9> >()) )
// t = stk::topology::SHELL_QUAD_8_ALL_FACE_SIDES;
}
else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::ShellQuadrilateral<9> >()) ) {
t = stk::topology::SHELL_QUAD_9;
// t = stk::topology::SHELL_QUAD_9_ALL_FACE_SIDES;
}

else if ( shards_topology == shards::CellTopology(shards::getCellTopologyData< shards::Tetrahedron<4> >()) )
t = stk::topology::TET_4;
Expand Down Expand Up @@ -1389,12 +1406,25 @@ shards::CellTopology get_cell_topology(stk::topology t)
//return shards::CellTopology(shards::getCellTopologyData<shards::ShellTriangle<4>>());
case stk::topology::SHELL_TRI_6:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellTriangle<6>>());
case stk::topology::SHELL_TRI_3_ALL_FACE_SIDES:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellTriangle<3>>());
case stk::topology::SHELL_TRI_4_ALL_FACE_SIDES: break;
//NOTE: shards does not define a topology for a 4-noded triangular shell
//return shards::CellTopology(shards::getCellTopologyData<shards::ShellTriangle<4>>());
case stk::topology::SHELL_TRI_6_ALL_FACE_SIDES:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellTriangle<6>>());
case stk::topology::SHELL_QUAD_4:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellQuadrilateral<4>>());
case stk::topology::SHELL_QUAD_8:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellQuadrilateral<8>>());
case stk::topology::SHELL_QUAD_9:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellQuadrilateral<9>>());
case stk::topology::SHELL_QUAD_4_ALL_FACE_SIDES:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellQuadrilateral<4>>());
case stk::topology::SHELL_QUAD_8_ALL_FACE_SIDES:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellQuadrilateral<8>>());
case stk::topology::SHELL_QUAD_9_ALL_FACE_SIDES:
return shards::CellTopology(shards::getCellTopologyData<shards::ShellQuadrilateral<9>>());
case stk::topology::TET_4:
return shards::CellTopology(shards::getCellTopologyData<shards::Tetrahedron<4>>());
case stk::topology::TET_8:
Expand Down
31 changes: 31 additions & 0 deletions packages/stk/stk_mesh/stk_mesh/base/NgpFieldBLAS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,37 @@ void field_copy(const FieldBase& xField,
ngp_field_blas::impl::field_copy_impl(xField, yField, &selector, execSpace, isDeviceExecSpaceUserOverride);
}

template<class DataType, typename EXEC_SPACE>
inline void field_axpby(const stk::mesh::BulkData& mesh,
const DataType alpha,
const stk::mesh::FieldBase & xField,
const DataType beta,
const stk::mesh::FieldBase & yField,
const stk::mesh::Selector & selector,
const EXEC_SPACE& execSpace,
bool IsDeviceExecSpaceUserOverride = (!std::is_same_v<stk::ngp::HostExecSpace,EXEC_SPACE>))
{
// y = a*x + b*y

if constexpr (ngp_field_blas::impl::operate_on_ngp_mesh<EXEC_SPACE>()) {
ngp_field_blas::impl::apply_functor_on_field<double, stk::ngp_field_blas::impl::FieldAXPBYFunctor>(
mesh, yField, xField, yField, alpha, beta, selector);
}
else {
xField.sync_to_host();
yField.sync_to_host();
stk::mesh::field_axpby(alpha, xField, beta, yField, selector);
}

yField.clear_sync_state();
if (ngp_field_blas::impl::mark_modified_on_device(execSpace, IsDeviceExecSpaceUserOverride)) {
yField.modify_on_device();
}
else {
yField.modify_on_host();
}
}

template<class DataType, typename EXEC_SPACE>
inline void field_axpbyz(const stk::mesh::BulkData& mesh,
const DataType alpha,
Expand Down
1 change: 1 addition & 0 deletions packages/stk/stk_search_util/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ lib stk_search_util_base
/sierra/stk_search//stk_search
/sierra/stk_mesh//stk_mesh_base
/sierra/stk_util//stk_util_diag
/tpl/trilinos//intrepid2
:
[ ifuserbuild
# Any parameters within this 'ifuserbuild' block apply to user
Expand Down
4 changes: 3 additions & 1 deletion packages/stk/stk_tools/stk_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ if (STK_HAS_SEACAS_NEMESIS)
${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}/stk_tools/pmesh_lib)
endif()

INSTALL(TARGETS stk_block_extractor COMPONENT ${PACKAGE_NAME} RUNTIME DESTINATION ${${PROJECT_NAME}_INSTALL_RUNTIME_DIR})
if(TARGET stk_block_extractor)
INSTALL(TARGETS stk_block_extractor COMPONENT ${PACKAGE_NAME} RUNTIME DESTINATION ${${PROJECT_NAME}_INSTALL_RUNTIME_DIR})
endif()

if(NOT HAVE_STK_Trilinos)
INSTALL(TARGETS stk_transfer_utils_lib EXPORT stkTargets DESTINATION ${STK_INSTALL_LIBDIR})
Expand Down
Loading

0 comments on commit 002d398

Please sign in to comment.