In our example, we have two arrays, `T` and `dT`. Both are 2-dimensional `double` arrays, their global size is `12x20` and the file contains `3 output steps` of these arrays.
In our example, we have two arrays, `T` and `dT`. Both are 2-dimensional `double` arrays, their global size is `15x16` and the file contains `3 output steps` of these arrays.
.. note::
@@ -40,8 +39,9 @@ Here is the description of the most used options
.. code-block:: bash
$ bpls -l a.bp
double T 3*{12, 20} = 2.17453e-06 / 200
double dT 3*{12, 20} = -41.384 / 40.2627
double T 3*{15, 16} = 0 / 200
double dT 3*{15, 16} = -53.1922 / 49.7861
* **-a** **-A**
@@ -50,35 +50,39 @@ Here is the description of the most used options
.. code-block:: bash
$ bpls a.bp -la
double T 3*{12, 20} = 2.17453e-06 / 200
double T 3*{15, 16} = 0 / 200
string T/description attr = "Temperature from simulation"
string T/unit attr = "C"
double dT 3*{12, 20} = -41.384 / 40.2627
double dT 3*{15, 16} = -53.1922 / 49.7861
string dT/description attr = "Temperature difference between two steps calculated in analysis"
* `pattern`
Select which variables/attributes to list or dump. By default the pattern is like a shell file pattern. Using the -e option the pattern will be used as an regular expression
* `pattern`, **-e**
Select which variables/attributes to list or dump. By default the pattern(s) are interpreted as shell file patterns.
.. code-block:: bash
$ bpls a.bp -la T*
double T 3*{12, 20} = 2.17453e-06 / 200
double T 3*{15, 16} = 0 / 200
Multiple patterns can be defined in the command line.
.. code-block:: bash
$ bpls a.bp -la T.* -e
double T 3*{12, 20} = 2.17453e-06 / 200
$ bpls a.bp -la T/* dT/*
string T/description attr = "Temperature from simulation"
string T/unit attr = "C"
string dT/description attr = "Temperature difference between two steps calculated in analysis"
If the -e option is given (all) the pattern(s) will be interpreted as regular expressions.
.. code-block:: bash
$ bpls a.bp -la T/* dT/*
$ bpls a.bp -la T.* -e
double T 3*{15, 16} = 0 / 200
string T/description attr = "Temperature from simulation"
string T/unit attr = "C"
string dT/description attr = "Temperature difference between two steps calculated in analysis"
* **-D**
@@ -88,19 +92,19 @@ Here is the description of the most used options
.. code-block:: bash
$ bpls a.bp -l T -D
double T 3*{12, 20} = 2.17453e-06 / 200
double T 3*{15, 16} = 0 / 200
step 0:
block 0: [ 0: 3, 0:19] = 2.17453e-06 / 169.366
block 1: [ 4: 7, 0:19] = 36.2402 / 200
block 2: [ 8:11, 0:19] = 2.17453e-06 / 169.366
block 0: [ 0: 4, 0:15] = 3.54199e-14 / 200
block 1: [ 5: 9, 0:15] = 58.3642 / 200
block 2: [10:14, 0:15] = 0 / 200
step 1:
block 0: [ 0: 3, 0:19] = 34.4583 / 129.104
block 1: [ 4: 7, 0:19] = 53.9598 / 164.721
block 2: [ 8:11, 0:19] = 34.4583 / 139.093
block 0: [ 0: 4, 0:15] = 31.4891 / 153.432
block 1: [ 5: 9, 0:15] = 68.2107 / 180.184
block 2: [10:14, 0:15] = 31.4891 / 161.699
step 2:
block 0: [ 0: 3, 0:19] = 47.8894 / 117.111
block 1: [ 4: 7, 0:19] = 61.6086 / 149.78
block 2: [ 8:11, 0:19] = 48.6223 / 128.216
block 0: [ 0: 4, 0:15] = 48.0431 / 135.225
block 1: [ 5: 9, 0:15] = 74.064 / 170.002
block 2: [10:14, 0:15] = 48.0431 / 147.87
In this case we find 3 blocks per output step and 3 output steps. We can see that the variable `T` was decomposed in the first (slow) dimension. In the above example, the `T` variable in the simulation output (sim.bp) had 12 blocks per step, but the analysis code was running on 3 processes, effectively reorganizing the data into fewer larger blocks.
@@ -108,3 +112,73 @@ Here is the description of the most used options
* **-d**
Dump the data content of a variable. For pretty-printing, one should use the additional `-n` and `-f` options. For selecting only a subset of a variable, one should use the `-s` and `-c` options.
By default, six values are printed per line and using C style `-g` prints for floating point values.
For selecting a subset of a variable, use the `-s` and `-c` options. These options are N+1 dimensional for N-dimensional arrays with more than one steps. The first element of the options are used to select the starting step and the number of steps to print.
The following example dumps a 4x4 small subset from the center of the array, one step from the second (middle) step:
.. code-block:: bash
$ bpls a.bp -d T -s "1,6,7" -c "1,4,4" -n 4
double T 3*{15, 16}
slice (1:1, 6:9, 7:10)
(1,6, 7) 144.09 131.737 119.383 106.787
(1,7, 7) 145.794 133.44 121.086 108.49
(1,8, 7) 145.794 133.44 121.086 108.49
(1,9, 7) 144.09 131.737 119.383 106.787
* **-y** **\-\-noindex**
Data can be dumped in a format that is easier to import later into other tools, like Excel. The leading array indexes can be omitted by using this option. Non-data lines, like the variable and slice info, are printed with a starting ";".
HDF5 files can also be dumped with bpls if ADIOS was built with HDF5 support. Note that the HDF5 files do not contain min/max information for the arrays and therefore bpls always prints 0 for them: