Skip to content

Commit

Permalink
IOSS: Reduce memory usage for line decomp
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Jun 12, 2024
1 parent 0e91dd1 commit 164c967
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/seacas/libraries/ioss/src/exodus/Ioex_DecompositionData.C
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ namespace Ioex {
// processor p contains all elements/nodes from X_dist[p] .. X_dist[p+1]
m_decomposition.generate_entity_distributions(globalNodeCount, globalElementCount);

generate_adjacency_list(filePtr, m_decomposition);
if (!m_decomposition.m_lineDecomp) {
generate_adjacency_list(filePtr, m_decomposition);
}

#if IOSS_DEBUG_OUTPUT
fmt::print(Ioss::DebugOut(), "Processor {} has {} elements; offset = {}\n", m_processor,
Expand All @@ -163,7 +165,7 @@ namespace Ioex {
fmt::group_digits(decomp_node_count()), fmt::group_digits(decomp_node_offset()));
#endif

if (m_decomposition.needs_centroids()) {
if (!m_decomposition.m_lineDecomp && m_decomposition.needs_centroids()) {
// Get my coordinate data using direct exodus calls
size_t size = decomp_node_count();
if (size == 0) {
Expand Down Expand Up @@ -324,6 +326,12 @@ namespace Ioex {
m_decomposition.show_progress("***LINE_DECOMPOSE END***");
}

if (m_decomposition.m_lineDecomp) {
// Do not combine into previous if block since we want to release memory for
// the local vectors in that block before allocating the large adjacency vector.
generate_adjacency_list(filePtr, m_decomposition);
}

#if !defined(NO_ZOLTAN_SUPPORT)
float version = 0.0;
Zoltan_Initialize(0, nullptr, &version);
Expand Down

0 comments on commit 164c967

Please sign in to comment.