From 814a2d984881def2128a7af40d7601c4cc30f19e Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 24 Sep 2024 17:42:08 -0600 Subject: [PATCH] IOSS: Fix output of proc_id map. Was using badd offset --- .../ioss/src/exodus/Ioex_ParallelDatabaseIO.C | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C index c6222043d2..40357f0b8b 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_ParallelDatabaseIO.C @@ -4000,13 +4000,13 @@ namespace Ioex { index += comp_count; } } - auto eb_offset = - eb->get_offset(); // Offset of beginning of the element block elements for this block - int index = -1 * (field.get_index() + - comp); // Negative since specifying index, not id to exodus API. + int map_index = -1 * (field.get_index() + + comp); // Negative since specifying index, not id to exodus API. - ierr = ex_put_partial_num_map(get_file_pointer(), EX_ELEM_MAP, index, - proc_offset + eb_offset + 1, file_count, component.data()); + size_t global_map_offset = eb->get_property("global_map_offset").get_int(); + ierr = ex_put_partial_num_map(get_file_pointer(), EX_ELEM_MAP, map_index, + global_map_offset + proc_offset + 1, file_count, + component.data()); } } else if (role == Ioss::Field::ATTRIBUTE) {