File: CompressorZFP.rst

package info (click to toggle)
adios2 2.10.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 33,764 kB
  • sloc: cpp: 175,964; ansic: 160,510; f90: 14,630; yacc: 12,668; python: 7,275; perl: 7,126; sh: 2,825; lisp: 1,106; xml: 1,049; makefile: 579; lex: 557
file content (56 lines) | stat: -rw-r--r-- 2,446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
*************
CompressorZFP
*************

The ``CompressorZFP`` Operator is compressor that uses a lossy but optionally
error-bounded compression to achieve high compression ratios.

ZFP provides compressed-array classes that support high throughput read and
write random access to individual array elements. ZFP also supports serial and
parallel (OpenMP and CUDA) compression of whole arrays, e.g., for applications
that read and write large data sets to and from disk.

ADIOS2 provides a ``CompressorZFP`` operator that lets you compress an
decompress variables. Below there is an example of how to invoke
``CompressorZFP`` operator:

.. code-block:: c++

    adios2::IO io = adios.DeclareIO("Output");
    auto ZFPOp    = adios.DefineOperator("CompressorZFP", adios2::ops::LossyZFP);

    auto var_r32 = io.DefineVariable<float>("r32", shape, start, count);
    var_r32.AddOperation(ZFPOp, {{adios2::ops::zfp::key::rate, rate}});

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CompressorZFP Specific parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``CompressorZFP`` operator accepts the following operator specific
parameters:

+-------------------+---------------------------------------------+
| ``CompressorZFP`` available parameters                          |
+===================+=============================================+
| ``accuracy``      | Fixed absolute error tolerance              |
+-------------------+---------------------------------------------+
| ``rate``          | Fixed number of bits in a compression unit  |
+-------------------+---------------------------------------------+
| ``precision``     | Fixed number of uncompressed bits per value |
+-------------------+---------------------------------------------+
| ``backend``       | Backend device: ``cuda`` ``omp`` ``serial`` |
+-------------------+---------------------------------------------+

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CompressorZFP Execution Policy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``CompressorZFP`` can run in multiple backend devices: GPUs (CUDA), OpenMP, and
in the host CPU. By default ``CompressorZFP`` will choose its backend following
the above order upon the availability of the device adapter.

Exceptionally, if its corresponding ADIOS2 variable contains a CUDA memory
address, this is a CUDA buffer, the CUDA backend will be called if available.

In any case, the user can manually set the backend using the ZFPOperator
specific parameter ``backend``.