Skip to content

Commit

Permalink
Try with ReadRandomAccess mode when reading a file
Browse files Browse the repository at this point in the history
Current error:
```
Log file: ./tests/libs/adios2/tests/family-gnu14-mpich/arrays_read.log
2024-10-10T13:31:18.3670468Z terminate called after throwing an instance of 'std::logic_error'
2024-10-10T13:31:18.3676365Z   what():  ␛[1;36m[Thu Oct 10 13:30:59 2024]␛[1;34m [ADIOS2 EXCEPTION]␛[0m <Engine> <BP5Reader> <NotifyEngineNoVarsQuery> : You've called InquireVariable() when the IO is empty and outside a BeginStep/EndStep pair.  If this is code that is newly transititioning to the BP5 file engine, you may be relying upon deprecated behaviour.  If you intend to use ADIOS using the Begin/EndStep interface, move all InquireVariable calls inside the BeginStep/EndStep pair.  If intending to use random-access file mode, change your Open() mode parameter to Mode::ReadRandomAccess.␛[0m
```

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
  • Loading branch information
martin-g authored and adrianreber committed Oct 21, 2024
1 parent 0ae1fba commit e10c93f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/libs/adios2/tests/arrays_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(int argc, char *argv[])
adios2::IO bpIO = adios.DeclareIO("ReadBP");

/** Engine derived class, spawned to start IO operations */
adios2::Engine bpReader = bpIO.Open(filename, adios2::Mode::Read);
adios2::Engine bpReader = bpIO.Open(filename, adios2::Mode::ReadRandomAccess);

const std::map<std::string, adios2::Params> variables =
bpIO.AvailableVariables();
Expand Down

0 comments on commit e10c93f

Please sign in to comment.