Skip to content

Commit

Permalink
Merge Pull Request #13483 from trilinos/Trilinos/master_merge_2024092…
Browse files Browse the repository at this point in the history
…7_175820

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: b'Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20240927_175820 branch to master'
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Sep 28, 2024
2 parents 8b5d31a + 71f1963 commit a90610d
Show file tree
Hide file tree
Showing 116 changed files with 3,133 additions and 1,222 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand All @@ -85,6 +85,6 @@ jobs:
make -j 2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
sarif_file: results.sarif
24 changes: 21 additions & 3 deletions packages/pamgen/src/parse_routines.C
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,13 @@ namespace PAMGEN_NEVADA {
ss << "Zblock index out of range, should run from 1 to " << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = token_stream->Parse_Real();
Real val = token_stream->Parse_Real();
if(val <= 0.){
std::stringstream ss;
ss << "Block size must be positive." << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = val;
break;}
case P_RBLOCK:{
block_index = token_stream->Parse_Integer()-1;
Expand All @@ -670,7 +676,13 @@ namespace PAMGEN_NEVADA {
ss << "Rblock/Xblock index out of range, should run from 1 to " << Inline_Mesh_Desc::im_static_storage->inline_b[0] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = token_stream->Parse_Real();
Real val = token_stream->Parse_Real();
if(val <= 0.){
std::stringstream ss;
ss << "Block size must be positive." << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = val;
break;}
case P_ABLOCK:{
block_index = token_stream->Parse_Integer()-1;
Expand All @@ -679,7 +691,13 @@ namespace PAMGEN_NEVADA {
ss << "Ablock/Yblock index out of range, should run from 1 to " << Inline_Mesh_Desc::im_static_storage->inline_b[1] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = token_stream->Parse_Real();
Real val = token_stream->Parse_Real();
if(val <= 0.){
std::stringstream ss;
ss << "Block size must be positive." << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = val;
break;}


Expand Down
13 changes: 11 additions & 2 deletions packages/seacas/applications/cpup/cpup.C
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
unsigned int debug_level = 0;

#if FMT_VERSION >= 90000
#include "Ioss_ZoneConnectivity.h"
#include "Ioss_StructuredBlock.h"

namespace fmt {
template <> struct formatter<Ioss::ZoneConnectivity> : ostream_formatter
{
Expand Down Expand Up @@ -712,19 +715,25 @@ namespace {
fmt::print(stderr, " {:14} cells, {:14} nodes ", fmt::group_digits(num_cell),
fmt::group_digits(num_node));

#if defined(__NVCC__)
#define CONST
#else
#define CONST const
#endif
if (!sb->m_zoneConnectivity.empty()) {
fmt::print(stderr, "\n\tConnectivity with other blocks:\n");
for (const auto &zgc : sb->m_zoneConnectivity) {
for (CONST auto &zgc : sb->m_zoneConnectivity) {
fmt::print(stderr, "{}\n", zgc);
}
}

if (!sb->m_boundaryConditions.empty()) {
fmt::print(stderr, "\tBoundary Conditions:\n");
for (const auto &bc : sb->m_boundaryConditions) {
for (CONST auto &bc : sb->m_boundaryConditions) {
fmt::print(stderr, "{}\n", bc);
}
}
#undef CONST
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4811,7 +4811,7 @@ namespace Ioex {
std::vector<INT> proc_id(elementCount, myProcessor);
const auto &blocks = region->get_element_blocks();
for (const auto &block : blocks) {
put_field_internal(block, block->get_field("proc_id"), Data(proc_id), -1);
put_field_internal(block, block->get_field("proc_id"), Data(proc_id), 0);
}
}

Expand Down
135 changes: 58 additions & 77 deletions packages/seacas/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ endif()

SET( ACCESSDIR ${CMAKE_INSTALL_PREFIX} )
SET( SEPARATOR "_")
INCLUDE(GNUInstallDirs)

ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_SEACASNemspread)
ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_SEACASNemslice)
Expand All @@ -23,7 +24,7 @@ IF (${PROJECT_NAME}_ENABLE_SEACASNemspread AND ${PROJECT_NAME}_ENABLE_SEACASNems
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/decomp DESTINATION bin)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/decomp DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF()

ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_SEACASBlot)
Expand All @@ -33,7 +34,7 @@ IF (${PROJECT_NAME}_ENABLE_SEACASBlot)
${CMAKE_CURRENT_BINARY_DIR}/blot
@ONLY
)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/blot DESTINATION bin)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/blot DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF()

ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_SEACASFastq)
Expand All @@ -43,7 +44,7 @@ IF (${PROJECT_NAME}_ENABLE_SEACASFastq)
${CMAKE_CURRENT_BINARY_DIR}/fastq
@ONLY
)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fastq DESTINATION bin)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fastq DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF()

ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_SEACASEpu)
Expand All @@ -53,7 +54,7 @@ IF (${PROJECT_NAME}_ENABLE_SEACASEpu)
${CMAKE_CURRENT_BINARY_DIR}/epup
@ONLY
)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/epup DESTINATION bin)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/epup DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF()

ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_SEACASConjoin)
Expand All @@ -63,7 +64,7 @@ IF (${PROJECT_NAME}_ENABLE_SEACASConjoin)
${CMAKE_CURRENT_BINARY_DIR}/pconjoin
@ONLY
)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pconjoin DESTINATION bin)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pconjoin DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF()

TRIBITS_INCLUDE_DIRECTORIES(
Expand Down Expand Up @@ -99,86 +100,66 @@ IF (${PROJECT_NAME}_ENABLE_SEACASExodus)
SET( EXODUSPY "exodus3.py" )
SET( EXOMERGE "exomerge3.py")
# IF (NOT ${PROJECT_NAME}_HOSTNAME STREQUAL "APPVEYOR-VM")
# ADD_TEST(NAME test_exodus3.py COMMAND ${CMAKE_INSTALL_PREFIX}/lib/tests/test_exodus3.py)
# ADD_TEST(NAME test_exomerge3.py COMMAND ${CMAKE_INSTALL_PREFIX}/lib/tests/exomerge_unit_test.py)
# ADD_TEST(NAME test_exodus3.py COMMAND ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/tests/test_exodus3.py)
# ADD_TEST(NAME test_exomerge3.py COMMAND ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/tests/exomerge_unit_test.py)
# ENDIF()
MESSAGE(STATUS "A Python-3 version of exodus.py and exomerge.py will be installed.")
ENDIF()

IF (BUILD_SHARED_LIBS OR SEACASExodus_ENABLE_SHARED)
IF (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
IF( ${${PROJECT_NAME}_INSTALL_INCLUDE_DIR} MATCHES "^${CMAKE_INSTALL_PREFIX}.*" )
STRING( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" ""
SEACAS_INCLUDEDIR "${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}" )
STRING( REGEX REPLACE "^/" "" SEACAS_INCLUDEDIR "${SEACAS_INCLUDEDIR}" )
ELSEIF( NOT ${${PROJECT_NAME}_INSTALL_INCLUDE_DIR} MATCHES "^/" )
SET( SEACAS_INCLUDEDIR "${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}" )
ELSE()
SET( SEACAS_INCLUDEDIR "include" )
ENDIF()
IF( ${${PROJECT_NAME}_INSTALL_LIB_DIR} MATCHES "^${CMAKE_INSTALL_PREFIX}.*" )
STRING( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" ""
SEACAS_LIBDIR "${${PROJECT_NAME}_INSTALL_LIB_DIR}" )
STRING( REGEX REPLACE "^/" "" SEACAS_LIBDIR "${SEACAS_LIBDIR}")
ELSEIF( NOT ${CMAKE_INSTALL_LIBDIR} MATCHES "^/" )
SET( SEACAS_LIBDIR "${${PROJECT_NAME}_INSTALL_LIB_DIR}" )
ELSE()
SET( SEACAS_LIBDIR "lib" )
ENDIF()
ENDIF()
FILE(GLOB_RECURSE EXODUSIIH "${CMAKE_SOURCE_DIR}/packages/seacas/*exodusII.h")
FILE(STRINGS "${EXODUSIIH}" EXODUS_VERSION REGEX "#define EXODUS_VERSION .*")
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exodus2.in.py
${CMAKE_CURRENT_BINARY_DIR}/exodus2.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exodus3.in.py
${CMAKE_CURRENT_BINARY_DIR}/exodus3.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/tests/exomerge_unit_test.py
${CMAKE_CURRENT_BINARY_DIR}/tests/exomerge_unit_test.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exomerge3.py
${CMAKE_CURRENT_BINARY_DIR}/exomerge3.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exomerge2.py
${CMAKE_CURRENT_BINARY_DIR}/exomerge2.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/tests/test_exodus3.py
${CMAKE_CURRENT_BINARY_DIR}/tests/test_exodus3.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/tests/test-assembly.exo
${CMAKE_CURRENT_BINARY_DIR}/tests/test-assembly.exo
COPYONLY
)
FILE(GLOB_RECURSE EXODUSIIH "${CMAKE_SOURCE_DIR}/packages/seacas/*exodusII.h")
FILE(STRINGS "${EXODUSIIH}" EXODUS_VERSION REGEX "#define EXODUS_VERSION .*")
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exodus2.in.py
${CMAKE_CURRENT_BINARY_DIR}/exodus2.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exodus3.in.py
${CMAKE_CURRENT_BINARY_DIR}/exodus3.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/tests/exomerge_unit_test.py
${CMAKE_CURRENT_BINARY_DIR}/tests/exomerge_unit_test.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exomerge3.py
${CMAKE_CURRENT_BINARY_DIR}/exomerge3.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/exomerge2.py
${CMAKE_CURRENT_BINARY_DIR}/exomerge2.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/tests/test_exodus3.py
${CMAKE_CURRENT_BINARY_DIR}/tests/test_exodus3.py
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/tests/test-assembly.exo
${CMAKE_CURRENT_BINARY_DIR}/tests/test-assembly.exo
COPYONLY
)

INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exodus2.py DESTINATION lib)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exodus3.py DESTINATION lib)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tests/test_exodus3.py DESTINATION lib/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tests/exomerge_unit_test.py DESTINATION lib/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/tests/test-assembly.exo DESTINATION lib/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/tests/exomerge_unit_test.e DESTINATION lib/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exomerge2.py DESTINATION lib)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exomerge3.py DESTINATION lib)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exodus2.py DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exodus3.py DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tests/test_exodus3.py DESTINATION ${CMAKE_INSTALL_LIBDIR}/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tests/exomerge_unit_test.py DESTINATION ${CMAKE_INSTALL_LIBDIR}/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/tests/test-assembly.exo DESTINATION ${CMAKE_INSTALL_LIBDIR}/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/tests/exomerge_unit_test.e DESTINATION ${CMAKE_INSTALL_LIBDIR}/tests/)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exomerge2.py DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/exomerge3.py DESTINATION ${CMAKE_INSTALL_LIBDIR})

if (${CMAKE_PROJECT_NAME} STREQUAL "Seacas" AND NOT WIN32)
InstallSymLink(${EXODUSPY} ${CMAKE_INSTALL_PREFIX}/lib/exodus.py)
InstallSymLink(${EXOMERGE} ${CMAKE_INSTALL_PREFIX}/lib/exomerge.py)
endif()
if (${CMAKE_PROJECT_NAME} STREQUAL "Seacas" AND NOT WIN32)
InstallSymLink(${EXODUSPY} ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/exodus.py)
InstallSymLink(${EXOMERGE} ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/exomerge.py)
endif()
ELSE()
MESSAGE(STATUS "Exodus.py and exomerge.py NOT installed since shared exodus library is not available.")
MESSAGE(STATUS "Exodus.py and exomerge.py NOT installed since shared exodus library is not available.")
ENDIF()
else()
MESSAGE(STATUS "Exodus.py and exomerge.py NOT installed since Python could not be found.")
Expand Down
4 changes: 4 additions & 0 deletions packages/stk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

5.21.5 (STK_VERSION 5210500) 9/25/2024
general: Fixed MI300A unified memory build errors.
stk_search: Turned off sorted results by default.

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

Expand Down
3 changes: 2 additions & 1 deletion packages/stk/stk_balance/stk_balance/balanceUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#define STK_BALANCE_UTILS

#include "mpi.h"
#include <stk_mesh/base/BulkData.hpp>
#include <stk_mesh/base/Entity.hpp>
#include <stk_topology/topology.hpp>
#include "stk_mesh/base/Field.hpp" // for field_data
Expand All @@ -44,6 +43,8 @@

namespace stk
{
namespace mesh { class BulkData; }

namespace balance
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ void
NodeBalancer::getGlobalLoadImbalance(double &loadFactor, int& numLocallyOwnedNodes)
{
stk::mesh::Selector localSelector = m_metaData.locally_owned_part();
stk::mesh::EntityVector ownedNodes;
stk::mesh::get_entities(m_bulkData, stk::topology::NODE_RANK, localSelector, ownedNodes);
numLocallyOwnedNodes = stk::mesh::count_entities(m_bulkData, stk::topology::NODE_RANK, localSelector);

numLocallyOwnedNodes = ownedNodes.size();
int maxLocallyOwned = 0;
int minLocallyOwned = 0;
stk::all_reduce_max(m_bulkData.parallel(), &numLocallyOwnedNodes, &maxLocallyOwned, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ SearchElemPairs getBBIntersectionsForFacesParticles(stk::mesh::BulkData& stkMesh

stk::balance::internal::SearchElemPairs searchResults;

stk::search::coarse_search(faceBoxes, faceBoxes, stk::search::KDTREE, stkMeshBulkData.parallel(), searchResults);
bool enforceSearchResultSymmetry = true;
bool autoSwapDomainAndRange = true;
bool sortSearchResults = true;
stk::search::coarse_search(faceBoxes, faceBoxes, stk::search::KDTREE, stkMeshBulkData.parallel(), searchResults,
enforceSearchResultSymmetry, autoSwapDomainAndRange, sortSearchResults);

stk::balance::internal::SearchElemPairs::iterator iter = std::unique(searchResults.begin(), searchResults.end());
searchResults.resize(iter - searchResults.begin());
Expand Down
4 changes: 3 additions & 1 deletion packages/stk/stk_balance/stk_balance/io/BalanceIO.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "mpi.h"

#include "stk_mesh/base/MetaData.hpp"
#include "stk_mesh/base/BulkData.hpp"
#include "stk_io/StkMeshIoBroker.hpp"

#include "stk_balance/balanceUtils.hpp"
Expand All @@ -46,6 +45,9 @@
#include <memory>

namespace stk {

namespace mesh { class BulkData; }

namespace balance {

class BalanceIO
Expand Down
1 change: 1 addition & 0 deletions packages/stk/stk_balance/stk_balance/mesh/BalanceMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "BalanceMesh.hpp"
#include <stk_mesh/base/BulkData.hpp>

namespace stk {
namespace balance {
Expand Down
Loading

0 comments on commit a90610d

Please sign in to comment.