Skip to content

Commit

Permalink
IOSS: Fix handling of negative times with EXODUS_CALL_GET_ALL_TIMES p…
Browse files Browse the repository at this point in the history
…roperty

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.
  • Loading branch information
gdsjaar committed Mar 5, 2024
1 parent b7daf3c commit 44bb507
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>::max());

// The `EXODUS_CALL_GET_ALL_TIMES=NO` is typically only used in
// isSerialParallel mode and the client is responsible for
Expand Down

0 comments on commit 44bb507

Please sign in to comment.