Reading more steps than available
Created by: pnorbert
BP file: it returns 0 in the arrays (or does nothing) HDF5 file: it aborts ADIOS 1.x gave an error describing what's wrong. With 11 steps in the heat transfer output, the adios 1.x bpls behaves like this when trying to read 2 steps from the last available step:
$ bpls -l heat.bp -d -s "10,0,0" -c "2,10,6" --format "%5.2f"
double T 11*{160, 150} = -6.22402 / 7.02874 / null / null
slice (10:11, 0:9, 0:5)
ERROR: Variable T does not have timesteps 10 to 11 (last timestep is 10)
Error when scheduling variable T for reading. errno=-14 : Variable T does not have timesteps 10 to 11 (last timestep is 10)
utils/bpls in adios2 behaves like this for a BP file:
ADIOS2/build$ ./bin/bpls -l heat.bp -d -s "10,0,0" -c "2,10,6" --format "%5.2f"
double T 11*{160, 150}
slice (10:11, 0:9, 0:5)
(10,0,0) 2.95 2.90 2.85 2.80 2.77 2.73
(10,1,0) 2.90 2.80 2.70 2.62 2.54 2.48
(10,2,0) 2.85 2.70 2.56 2.44 2.32 2.23
(10,3,0) 2.80 2.61 2.43 2.27 2.13 2.01
(10,4,0) 2.76 2.54 2.32 2.13 1.95 1.81
(10,5,0) 2.73 2.47 2.23 2.00 1.81 1.64
(10,6,0) 2.70 2.42 2.15 1.90 1.69 1.50
(10,7,0) 2.68 2.38 2.09 1.83 1.60 1.40
(10,8,0) 2.67 2.35 2.05 1.78 1.54 1.33
(10,9,0) 2.66 2.34 2.03 1.75 1.50 1.30
(11,0,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,1,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,2,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,3,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,4,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,5,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,6,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,7,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,8,0) 0.00 0.00 0.00 0.00 0.00 0.00
(11,9,0) 0.00 0.00 0.00 0.00 0.00 0.00
and on a HDF5 file, it aborts:
ADIOS2/build$ ./bin/bpls -l heat.h5 -d -s "10,0,0" -c "2,10,6" --format "%5.2f"
double T 11*{160, 150}
slice (10:11, 0:9, 0:5)
terminate called after throwing an instance of 'std::ios_base::failure[abi:cxx11]'
what(): ERROR: given time step is more than actual known steps.: iostream error
[adiosVM:32695] *** Process received signal ***
[adiosVM:32695] Signal: Aborted (6)
[adiosVM:32695] Signal code: (-6)
[adiosVM:32695] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f2d74db3390]
[adiosVM:32695] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f2d74a0d428]
[adiosVM:32695] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f2d74a0f02a]
[adiosVM:32695] [ 3] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x16d)[0x7f2d7526484d]
[adiosVM:32695] [ 4] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d6b6)[0x7f2d752626b6]
[adiosVM:32695] [ 5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d701)[0x7f2d75262701]
[adiosVM:32695] [ 6] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d919)[0x7f2d75262919]
[adiosVM:32695] [ 7] /home/adios/work/ADIOS2/build/lib/libadios2.so.2(_ZN6adios27interop10HDF5Common12SetAdiosStepEi+0x167)[0x7f2d761e0a9b]
[adiosVM:32695] [ 8] /home/adios/work/ADIOS2/build/lib/libadios2.so.2(_ZN6adios211HDF5ReaderP10UseHDFReadIdEEvRNS_8VariableIT_EEPS3_i+0x580)[0x7f2d761da92a]
[adiosVM:32695] [ 9] /home/adios/work/ADIOS2/build/lib/libadios2.so.2(_ZN6adios211HDF5ReaderP13GetSyncCommonIdEEvRNS_8VariableIT_EEPS3_+0x40)[0x7f2d761dde00]
[adiosVM:32695] [10] /home/adios/work/ADIOS2/build/lib/libadios2.so.2(_ZN6adios211HDF5ReaderP9DoGetSyncERNS_8VariableIdEEPd+0x2b)[0x7f2d761d1b4b]
[adiosVM:32695] [11] /home/adios/work/ADIOS2/build/lib/libadios2.so.2(_ZN6adios26Engine7GetSyncIdEEvRNS_8VariableIT_EEPS3_+0x3fc)[0x7f2d75fc149c]
[adiosVM:32695] [12] ./bin/bpls[0x4810c2]
[adiosVM:32695] [13] ./bin/bpls[0x471eb2]
[adiosVM:32695] [14] ./bin/bpls[0x4698ac]
[adiosVM:32695] [15] ./bin/bpls[0x46a39e]
[adiosVM:32695] [16] ./bin/bpls[0x468627]
[adiosVM:32695] [17] ./bin/bpls[0x46cbdc]
[adiosVM:32695] [18] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f2d749f8830]
[adiosVM:32695] [19] ./bin/bpls[0x467a09]
[adiosVM:32695] *** End of error message ***
For the latter one, the bug is probably in HDF5Common::SetAdiosStep(int step), the condition
if (step >= m_NumAdiosSteps)
passing for step one bigger than the last valid step index (NumAdiosSteps-1)