Skip to content

Commit

Permalink
CONJOIN: Fix integer 64/32 bit handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Jan 21, 2025
1 parent 36823de commit 9e7ad89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions packages/seacas/applications/conjoin/CJ_ExodusFile.C
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions packages/seacas/applications/conjoin/CJ_ExodusFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions packages/seacas/applications/conjoin/Conjoin.C
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9e7ad89

Please sign in to comment.