Heat Transfer + BP File reader bug in some cases

Created by: pnorbert

Some values are incorrect in some cases. The example I found 4 writers 4 x 5 rows written, read by 3 processes (6,6 and 8 rows, resp.). Process 0's last row is incorrect. Everywhere else the data is correct.

$ mpirun -n 4 ./bin/heatTransfer_write_adios2 /home/adios/work/worktree/ADIOS2/release/examples/heatTransfer/heat_bpfile.xml heat_bpfile_4.bp 4 1 5 6 1 1
Step 1:
Total runtime = 0.0173781s
$ mpirun -n 3 ./bin/heatTransfer_read /home/adios/work/worktree/ADIOS2/release/examples/heatTransfer/heat_bpfile.xml heat_bpfile_4.bp 3 1
gndx       = 20
gndy       = 6
rank 0 reads 2D slice 6 x 6 from offset (0,0)
rank 2 reads 2D slice 8 x 6 from offset (12,0)
rank 1 reads 2D slice 6 x 6 from offset (6,0)
Processing step 0
Processing step 1
$ cat data.0 
rank=0 size=6x6 offsets=0:0 step=0
 time   row   columns 0...5
                0        1        2        3        4        5
--------------------------------------------------------------
    0    0        1        1      2.7        1    -0.73        1
    0    1     -1.9     -1.9     -0.2     -1.9     -3.7     -1.9
    0    2      1.4      1.4      3.2      1.4     -0.3      1.4
    0    3      1.4      1.4      3.2      1.4     -0.3      1.4
    0    4     -1.9     -1.9     -0.2     -1.9     -3.7     -1.9
    0    5 2.5e+243 7.6e+170   6e+175 2.6e+257 1.7e+214   6e+175
rank=0 size=6x6 offsets=0:0 step=1
 time   row   columns 0...5
                0        1        2        3        4        5
--------------------------------------------------------------
    1    0      1.2      1.2      1.5     0.81     0.12     0.87
    1    1     0.31    -0.32     0.37    -0.67     -1.7   -0.032
    1    2      1.1      1.1      1.8     0.76    -0.28     0.72
    1    3      1.1      1.1      1.8     0.76    -0.28     0.72
    1    4     0.31    -0.32     0.37    -0.67     -1.7   -0.032
    1    5 2.5e+243 7.6e+170   6e+175 2.6e+257 1.7e+214   6e+175

The file is correct, the bug is in the reader. ADIOS1 reader on the file produces the correct data. Also:

$ bpls -l heat_bpfile_4.bp -d T -n 6 -f "%6.2g" -c "-1,6,-1"
  double   T     2*{20, 6} = -3.6591 / 3.1591 / null  / null 
    slice (0:1, 0:5, 0:5)
    (0,0,0)         1      1    2.7      1  -0.73      1
    (0,1,0)      -1.9   -1.9   -0.2   -1.9   -3.7   -1.9
    (0,2,0)       1.4    1.4    3.2    1.4   -0.3    1.4
    (0,3,0)       1.4    1.4    3.2    1.4   -0.3    1.4
    (0,4,0)      -1.9   -1.9   -0.2   -1.9   -3.7   -1.9
    (0,5,0)         1      1    2.7      1  -0.73      1 
    (1,0,0)       1.2    1.2    1.5   0.81   0.12   0.87
    (1,1,0)      0.31  -0.32   0.37  -0.67   -1.7 -0.032
    (1,2,0)       1.1    1.1    1.8   0.76  -0.28   0.72
    (1,3,0)       1.1    1.1    1.8   0.76  -0.28   0.72
    (1,4,0)      0.31  -0.32   0.37  -0.67   -1.7 -0.032
    (1,5,0)      0.23   0.18   0.87  -0.17   -1.2  -0.12