From 44bb5074e51604b16a5aaea7d6838c3f9af27890 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 5 Mar 2024 15:21:13 -0700 Subject: [PATCH] IOSS: Fix handling of negative times with EXODUS_CALL_GET_ALL_TIMES property If the application set EXODUS_CALL_GET_ALL_TIMES to NO, then the timesteps were only correct on rank=0 and zero on all other ranks. This caused problems when the timestep time values were negative as the check against the last_written_time attribute failed and all timesteps were skipped. This sets the timestep values to -double_max on the ranks where we skip reading the actual timestep time values and all other logic stays the same. We could skip more code and checking for that special case, but this way we can still run most of the same logic in case application wants to sync the times itself. --- packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C b/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C index 0843e9d9c8..1caabd5ebe 100644 --- a/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C +++ b/packages/seacas/libraries/ioss/src/exodus/Ioex_DatabaseIO.C @@ -682,7 +682,7 @@ namespace Ioex { // For an exodus file, timesteps are global and are stored in the region. // Read the timesteps and add to the region - tsteps.resize(timestep_count); + tsteps.resize(timestep_count, -std::numeric_limits::max()); // The `EXODUS_CALL_GET_ALL_TIMES=NO` is typically only used in // isSerialParallel mode and the client is responsible for