MGARD
MGARD (MultiGrid Adaptive Reduction of Data) is a technique for multilevel lossy compression of scientific data based on the theory of multigrid methods. We encourage you to make a GitHub issue if you run into any problems using MGARD, have any questions or suggestions, etc.
Building and Installing
To build and install MGARD, run the following from the root of the repository. You will need CMake and Protobuf.
$ cmake -S . -B build -D CMAKE_INSTALL_PREFIX=<location to install MGARD>
$ cmake --build build
$ cmake --install build
Documentation
To build the documentation, run cmake
with -D MGARD_ENABLE_DOCS=ON
.
You will need Doxygen.
The documentation will be installed to ${CMAKE_INSTALL_PREFIX}/share/doc/MGARD/
by default.
Open index.html
with a browser to read.
Benchmarks
To build the benchmarks, run cmake
with -D MGARD_ENABLE_BENCHMARKS=ON
.
You will need Google Benchmark.
You can then run the benchmarks with build/bin/benchmarks
.
Including and Linking
The API consists of a header file compress.hpp
providing declarations for function templates mgard::compress
and mgard::decompress
.
See the header for documentation of these templates.
To use MGARD in your project, you will need to tell your compiler where to find the MGARD headers (by default, ${CMAKE_INSTALL_PREFIX}/include/mgard/
) and library (by default, ${CMAKE_INSTALL_PREFIX}/lib/
).
If you're using CMake, you can call find_package(mgard)
and add a dependency to the mgard::mgard
imported target.
See the examples directory for a basic example.
Command Line Interface
To build the command line interface, run cmake
with -D MGARD_ENABLE_CLI=ON
.
You will need TCLAP.
A convenience executable called mgard
will be built and installed to ${CMAKE_INSTALL_PREFIX}/bin/
by default.
You can get help with the CLI by running the following commands.
$ mgard --help
$ man mgard
This executable is an experimental part of the API.
Accelerated and portable compression
MGARD-X is designed for portable compression on NVIDIA GPUs, AMD GPUs, and CPUs. See detailed user guide in here.
CUDA accelerated compression
MGARD-GPU is designed for accelerating compression specifically using NVIDIA GPUs. See detailed user guide in here.
Fine-grain progressive data reconstruction
MDR and MDR-X are designed for enabling fine-grain data refactoring and progressive data reconstruction. See detailed user guide in here.
References
MGARD's theoretical foundation and software implementation are discussed in the following papers. Reference [2] covers the simplest case and is a natural starting point. Reference [6] covers the design and implementation on GPU heterogeneous systems.
- Ben Whitney. Multilevel Techniques for Compression and Reduction of Scientific Data. PhD thesis, Brown University, 2018.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—The Univariate Case. Computing and Visualization in Science 19, 65–76, 2018.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—The Multivariate Case. SIAM Journal on Scientific Computing 41 (2), A1278–A1303, 2019.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—Quantitative Control of Accuracy in Derived Quantities. SIAM Journal on Scientific Computing 41 (4), A2146–A2171, 2019.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—The Unstructured Case. SIAM Journal on Scientific Computing, 42 (2), A1402–A1427, 2020.
- Jieyang Chen et al. Accelerating Multigrid-based Hierarchical Scientific Data Refactoring on GPUs. 35th IEEE International Parallel & Distributed Processing Symposium, May 17–21, 2021.