From a4a2633ecd7e9ca6fdc7357d958f83cd649ddfba Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 11 Jun 2024 08:07:38 -0600 Subject: [PATCH] SLICE: Fix order of file close and mpi_finalize --- packages/seacas/applications/slice/Slice.C | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/seacas/applications/slice/Slice.C b/packages/seacas/applications/slice/Slice.C index 39d0257368..9cb38e7e79 100644 --- a/packages/seacas/applications/slice/Slice.C +++ b/packages/seacas/applications/slice/Slice.C @@ -387,12 +387,11 @@ int main(int argc, char *argv[]) dbi->set_surface_split_type(Ioss::SPLIT_BY_DONT_SPLIT); dbi->set_field_separator(0); - // NOTE: 'region' owns 'db' pointer at this time... - Ioss::Region region(dbi, "region_1"); - - region.output_summary(std::cerr, true); - try { + // NOTE: 'region' owns 'db' pointer at this time... + Ioss::Region region(dbi, "region_1"); + region.output_summary(std::cerr, true); + if (dbi->int_byte_size_api() == 4) { progress("4-byte slice"); slice(region, nem_file, interFace, 1);