Skip to content

Commit

Permalink
IOSS: Fix serialize io issue in timestep query
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Aug 26, 2024
1 parent efdc141 commit 11e9634
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ namespace Ioex {
{
Ioss::SerializeIO serializeIO_(this);
m_timestepCount = ex_inquire_int(get_file_pointer(), EX_INQ_TIME);
}
// Need to sync timestep count across ranks if parallel...
if (isParallel) {
auto min_timestep_count = util().global_minmax(m_timestepCount, Ioss::ParallelUtils::DO_MIN);
Expand Down Expand Up @@ -725,6 +726,7 @@ namespace Ioex {
Ioss::Utils::check_set_bool_property(properties, "EXODUS_CALL_GET_ALL_TIMES",
call_ex_get_all_times);
if (call_ex_get_all_times) {
Ioss::SerializeIO serializeIO_(this);
int error = ex_get_all_times(get_file_pointer(), Data(tsteps));
if (error < 0) {
Ioex::exodus_error(get_file_pointer(), __LINE__, __func__, __FILE__);
Expand All @@ -733,8 +735,11 @@ namespace Ioex {

// See if the "last_written_time" attribute exists and if it
// does, check that it matches the largest time in 'tsteps'.
exists = Ioex::read_last_time_attribute(get_file_pointer(), &last_time);
}
{
Ioss::SerializeIO serializeIO_(this);
exists = Ioex::read_last_time_attribute(get_file_pointer(), &last_time);
}

if (exists && isParallel) {
// Assume that if it exists on 1 processor, it exists on
// all... Sync value among processors since could have a
Expand Down

0 comments on commit 11e9634

Please sign in to comment.