AllStepsBlocksInfo + Fortran: dimension order mismatch
Created by: pnorbert
The blocks returned have the dimensions in the order of the source data (e.g. Fortran), not in the order the reader expects (e.g. bpls2 as C++). Therefore bpls -D is incorrect for Fortran app output and bpls -Dd results in out of boundary read requests.
adiosvm/Tutorial/heat2d/fortran$ mpirun -n 12 simulation/heatSimulation_adios2 heat 4 3 4 5 1 1
Process decomposition : 4 x 3
Array size per process : 4 x 5
Number of output steps : 1
Iterations per step : 1
The Fortran global array is (44) by (35), which is listed in C/C++ readers as 15,16. The blocks, however, keep their original Fortran order.
adiosvm/Tutorial/heat2d/fortran$ /opt/adios2/bin/bpls2 heat.bp -D
double T {15, 16}
step 0:
block 0: [ 0: 3, 0: 4]
block 1: [ 4: 7, 0: 4]
block 2: [ 8:11, 0: 4]
block 3: [12:15, 0: 4]
block 4: [ 0: 3, 5: 9]
block 5: [ 4: 7, 5: 9]
block 6: [ 8:11, 5: 9]
block 7: [12:15, 5: 9]
block 8: [ 0: 3, 10:14]
block 9: [ 4: 7, 10:14]
block 10: [ 8:11, 10:14]
block 11: [12:15, 10:14]
double dT {15, 16}
step 0:
block 0: [ 0: 3, 0: 4]
block 1: [ 4: 7, 0: 4]
block 2: [ 8:11, 0: 4]
block 3: [12:15, 0: 4]
block 4: [ 0: 3, 5: 9]
block 5: [ 4: 7, 5: 9]
block 6: [ 8:11, 5: 9]
block 7: [12:15, 5: 9]
block 8: [ 0: 3, 10:14]
block 9: [ 4: 7, 10:14]
block 10: [ 8:11, 10:14]
block 11: [12:15, 10:14]
Dumping a block fails because of the start,count calculation is wrong in bpls2 (due to the wrong offset,size order in the blocks' info).
adiosvm/Tutorial/heat2d/fortran$ /opt/adios2/bin/bpls2 heat.bp -Dd
double T {15, 16}
step 0:
block 0: [ 0: 3, 0: 4]
(0,0) 109.191 55.4442 114.575 65.3925 54.045 106.662
(1,1) 52.9152 112.046 62.8634 51.5159 125.707 71.9605
(2,2) 131.091 81.9088 70.5613 70.0993 16.3525 75.4833
(3,3) 26.3008 14.9533
block 1: [ 4: 7, 0: 4]
(0,0) 163.236 109.489 168.62 119.437 108.09 141.03
(1,1) 87.2828 146.414 97.2311 85.8835 133.351 79.6042
(2,2) 138.735 89.5525 78.205 106.03 52.2832 111.414
(3,3) 62.2315 50.884
block 2: [ 8:11, 0: 4]
(0,0) 112.352 58.6052 117.736 68.5535 57.206 85.031
(1,1) 31.2842 90.415 41.2325 29.885 77.3524 23.6056
(2,2) 82.7364 33.5539 22.2064 55.146 1.39925 60.53
(3,3) 11.3475 0
block 3: [12:15, 0: 4]
terminate called after throwing an instance of 'std::invalid_argument'
what(): ERROR: selection Start Dims(2):[12, 0] and Count Dims(2):[4, 5] (requested) is out of bounds of available Shape Dims(2):[16, 15] , when reading variable T, in call to Get
Note that the error message is also mixing orders. The selection is printed as coming from the C++ reader but the Shape is printed as coming from the Fortran data. Hence one could wonder what is wrong here when the selection looks good (in the error message)...