From 9e7ad89d1924fdfe7cb5a920437eb3ffed690d67 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 21 Jan 2025 16:55:39 -0700 Subject: [PATCH] CONJOIN: Fix integer 64/32 bit handling --- packages/seacas/applications/conjoin/CJ_ExodusFile.C | 5 +++++ packages/seacas/applications/conjoin/CJ_ExodusFile.h | 1 + packages/seacas/applications/conjoin/Conjoin.C | 5 +---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/seacas/applications/conjoin/CJ_ExodusFile.C b/packages/seacas/applications/conjoin/CJ_ExodusFile.C index d177cea458..368802474d 100644 --- a/packages/seacas/applications/conjoin/CJ_ExodusFile.C +++ b/packages/seacas/applications/conjoin/CJ_ExodusFile.C @@ -52,6 +52,11 @@ Excn::ExodusFile::ExodusFile(size_t which) : myLocation_(which) } } +bool Excn::ExodusFile::ints_64_bit() +{ + return exodusMode_ & EX_ALL_INT64_API; +} + int Excn::ExodusFile::output() { SMART_ASSERT(outputId_ >= 0); diff --git a/packages/seacas/applications/conjoin/CJ_ExodusFile.h b/packages/seacas/applications/conjoin/CJ_ExodusFile.h index bac3b6542b..f7d7671bdc 100644 --- a/packages/seacas/applications/conjoin/CJ_ExodusFile.h +++ b/packages/seacas/applications/conjoin/CJ_ExodusFile.h @@ -24,6 +24,7 @@ namespace Excn { static size_t part_count() { return filenames_.size(); } static bool initialize(const SystemInterface &si); static bool create_output(const SystemInterface &si); + static bool ints_64_bit(); static void close_all(); static int output(); diff --git a/packages/seacas/applications/conjoin/Conjoin.C b/packages/seacas/applications/conjoin/Conjoin.C index b9398e0030..9158176895 100644 --- a/packages/seacas/applications/conjoin/Conjoin.C +++ b/packages/seacas/applications/conjoin/Conjoin.C @@ -379,10 +379,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - int int_byte_size = 4; - if (interFace.ints_64_bit()) { - int_byte_size = 8; - } + int int_byte_size = Excn::ExodusFile::ints_64_bit() ? 8 : 4; if (Excn::ExodusFile::io_word_size() == 4) { if (int_byte_size == 4) {