Skip to content

Commit ef770c2

Browse files
committed
IOSS: Allow specifying names for the decomp omitted blocks
1 parent c05e6a2 commit ef770c2

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

packages/seacas/libraries/ioss/src/main/io_shell.C

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,11 @@ namespace {
781781
}
782782
}
783783

784-
if (!interFace.decomp_omitted_blocks.empty()) {
785-
properties.add(Ioss::Property("DECOMP_OMITTED_BLOCK_IDS", interFace.decomp_omitted_blocks));
784+
if (!interFace.decomp_omitted_block_ids.empty()) {
785+
properties.add(Ioss::Property("DECOMP_OMITTED_BLOCK_IDS", interFace.decomp_omitted_block_ids));
786+
}
787+
if (!interFace.decomp_omitted_block_names.empty()) {
788+
properties.add(Ioss::Property("DECOMP_OMITTED_BLOCK_NAMES", interFace.decomp_omitted_block_names));
786789
}
787790
if (interFace.retain_empty_blocks) {
788791
properties.add(Ioss::Property("RETAIN_EMPTY_BLOCKS", "YES"));

packages/seacas/libraries/ioss/src/main/shell_interface.C

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,14 @@ void IOShell::Interface::enroll_options()
242242
nullptr);
243243

244244
options_.enroll(
245-
"decomp_omit_blocks", Ioss::GetLongOption::OptType::MandatoryValue,
246-
"comma-separated list of element block ids that should NOT be ignored "
245+
"decomp_omit_block_ids", Ioss::GetLongOption::OptType::MandatoryValue,
246+
"comma-separated list of element block ids that should be ignored "
247+
"in\n"
248+
"\t\tthe parallel decomposition. Only valid for zoltan decomp methods: rcb, rib, hsfc",
249+
nullptr);
250+
options_.enroll(
251+
"decomp_omit_block_names", Ioss::GetLongOption::OptType::MandatoryValue,
252+
"comma-separated list of element block names that should be ignored "
247253
"in\n"
248254
"\t\tthe parallel decomposition. Only valid for zoltan decomp methods: rcb, rib, hsfc",
249255
nullptr, nullptr, true);
@@ -750,15 +756,21 @@ bool IOShell::Interface::parse_options(int argc, char **argv, int my_processor)
750756

751757
#if defined(SEACAS_HAVE_MPI)
752758
{
753-
const char *temp = options_.retrieve("decomp_omit_blocks");
759+
const char *temp = options_.retrieve("decomp_omit_block_ids");
754760
if (temp != nullptr) {
755761
auto omit_str = Ioss::tokenize(std::string(temp), ",");
756762
for (const auto &str : omit_str) {
757763
auto id = std::stoi(str);
758-
decomp_omitted_blocks.push_back(id);
764+
decomp_omitted_block_ids.push_back(id);
759765
}
760766
}
761767
}
768+
{
769+
const char *temp = options_.retrieve("decomp_omit_block_names");
770+
if (temp != nullptr) {
771+
decomp_omitted_block_names = std::string(temp);
772+
}
773+
}
762774
#endif
763775

764776
{

packages/seacas/libraries/ioss/src/main/shell_interface.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ namespace IOShell {
7070
std::vector<std::string> omitted_blocks{};
7171
std::vector<std::string> omitted_sets{};
7272

73-
//! If non-empty, a list of element block ids that should be omitted in a parallel
74-
//! decomposition. The blocks will still appear in the decomposed files, but will not
75-
//! affect the balance. Only active element blocks will be load-balanced.
76-
std::vector<int> decomp_omitted_blocks{};
73+
//! If non-empty, a list of element block ids and/or names that
74+
//! should be omitted in a parallel decomposition. The blocks will
75+
//! still appear in the decomposed files, but will not affect the
76+
//! balance. Only active element blocks will be load-balanced.
77+
std::vector<int> decomp_omitted_block_ids{};
78+
std::string decomp_omitted_block_names{};
7779

7880
//! If non-zero, then put `split_times` timesteps in each file. Then close file and start new
7981
//! file.

0 commit comments

Comments
 (0)