Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Sperr compression library to v0.8.2 #322

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/information.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ HDF5 compression filters and compression libraries sources were obtained from:
* `SZ plugin <https://github.com/szcompressor/SZ>`_
(commit `f466775 <https://github.com/szcompressor/SZ/tree/f4667759ead6a902110e80ff838ccdfddbc8dcd7>`_)
using `SZ <https://github.com/szcompressor/SZ>`_, ZLib and ZStd.
* `H5Z-SPERR plugin <https://github.com/NCAR/H5Z-SPERR>`_ (v0.1.3) using `SPERR <https://github.com/NCAR/SPERR>`_ (v0.8.1).
* `H5Z-SPERR plugin <https://github.com/NCAR/H5Z-SPERR>`_ (v0.1.3) using `SPERR <https://github.com/NCAR/SPERR>`_ (v0.8.2).
* `SZ3 plugin <https://github.com/szcompressor/SZ3>`_
(commit `4bbe9df7e4bcb <https://github.com/szcompressor/SZ3/commit/4bbe9df7e4bcb6ae6339fcb3033100da07fe7434>`_)
using `SZ3 <https://github.com/szcompressor/SZ3>`_ and ZStd.
Expand Down
4 changes: 2 additions & 2 deletions src/SPERR/.github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v4.8.0
uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: '13'
clang-format-version: '18'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
fallback-style: 'Chromium' # optional
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
builddir: 'build'
excludedirs: ''
extensions: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
cmakeoptions: '-DBUILD_CLI_UTILITIES=OFF -DBUILD_UNIT_TESTS=OFF -DUSE_ZSTD=OFF'
cmakeoptions: '-DBUILD_CLI_UTILITIES=OFF -DBUILD_UNIT_TESTS=OFF'
18 changes: 8 additions & 10 deletions src/SPERR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

cmake_minimum_required(VERSION 3.14)

project(SPERR VERSION 0.8.1 LANGUAGES CXX DESCRIPTION "Lossy Scientific Compression with SPERR")
project(SPERR VERSION 0.8.2 LANGUAGES CXX DESCRIPTION "Lossy Scientific Compression with SPERR")

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD "20" CACHE STRING "Choose the C++ Standard to use." FORCE)
set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "20" "17")
endif()

#
# specify the C++ standard
# CMake will try to add a -std=c++20 flag if the compiler supports, but if it doesn't,
# CMake will `decay` to a previous supported flag, e.g. -std=c++11.
#
set(CMAKE_CXX_STANDARD 20)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo")
Expand All @@ -32,7 +31,7 @@ endif()
option( BUILD_SHARED_LIBS "Build shared SPERR library" ON )
option( BUILD_UNIT_TESTS "Build unit tests using GoogleTest" ON )
option( BUILD_CLI_UTILITIES "Build a set of command line utilities" ON )
option( USE_OMP "Use OpenMP parallelization on 3D volumes" ON )
option( USE_OMP "Use OpenMP parallelization on 3D volumes" OFF )
option( SPERR_PREFER_RPATH "Set RPATH; this can fight with package managers so turn off when building for them" ON )
mark_as_advanced(FORCE SPERR_PREFER_RPATH)

Expand Down Expand Up @@ -109,8 +108,7 @@ if( BUILD_CLI_UTILITIES )
set( CLI11_SINGLE_FILE OFF CACHE INTERNAL "Don't use single file CLI11")
FetchContent_Declare( cli11
GIT_REPOSITORY https://github.com/CLIUtils/CLI11
GIT_TAG 291c58789c031208f08f4f261a858b5b7083e8e2 # v2.3.2
PATCH_COMMAND patch -N CMakeLists.txt < ${CMAKE_SOURCE_DIR}/cli11.patch || true
GIT_TAG 6c7b07a878ad834957b98d0f9ce1dbe0cb204fc9 # v2.4.2
)
FetchContent_MakeAvailable(cli11)

Expand Down
29 changes: 26 additions & 3 deletions src/SPERR/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[![clang-format](https://github.com/NCAR/SPERR/actions/workflows/clang-format.yml/badge.svg)](https://github.com/NCAR/SPERR/actions/workflows/clang-format.yml)
[![clang-tidy](https://github.com/NCAR/SPERR/actions/workflows/clang-tidy.yml/badge.svg)](https://github.com/NCAR/SPERR/actions/workflows/clang-tidy.yml)
[![unit-test](https://github.com/NCAR/SPERR/actions/workflows/unit-test.yml/badge.svg)](https://github.com/NCAR/SPERR/actions/workflows/unit-test.yml)
[![CodeQL](https://github.com/NCAR/SPERR/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/NCAR/SPERR/actions/workflows/codeql-analysis.yml)


[![DOI](https://zenodo.org/badge/225491235.svg)](https://zenodo.org/badge/latestdoi/225491235)


Expand All @@ -20,6 +17,31 @@ This combination gives SPERR flexibility to compress targetting different qualit
2) peak signal-to-noise ratio (PSNR), and 3) point-wise error (PWE).
The name of SPERR stands for **SP**eck with **ERR**or bounding.

## Quick Build
SPERR requires 1) a working C++ compiler and 2) CMake tools to build. On a Unix-like system,
the build steps are the following:

```bash
git clone https://github.com/NCAR/SPERR.git # clone the repo
mkdir SPERR/build # create the build directory
cd SPERR/build # enter the build directory
cmake .. # use cmake to configure the project
cmake -DUSE_OMP=ON .. # Optional: enable OpenMP on 3D volumes.
cmake -DCMAKE_INSTALL_PREFIX=/my/install/dir .. # Optional: specify a directory to install SPERR. The default is /usr/local .
cmake -DCMAKE_CXX_STANDARD=17 .. # Optional: use C++17 rather than C++20. The code is slightly faster with C++20.
make -j 8 # build the project
ctest . # run unit tests, which should have 100% tests passed
make install # install the library and CLI tools to a specified directory.
```

## Plugin for HDF5
SPERR is available as a *dynamically loaded plugin* for HDF5 with a registered ID of `32028`.
This plugin is available at this [repo](https://github.com/NCAR/H5Z-SPERR).

## Wrapper for Fortran
A Fortran wrapper for SPERR has also been created by [ofmla](https://github.com/ofmla)
at this [repo](https://github.com/ofmla/fortran-sperr).

## Documentation

SPERR documentation is hosted on Github [Wiki](https://github.com/NCAR/SPERR/wiki) pages. To get started, one might want to
Expand All @@ -45,5 +67,6 @@ If SPERR benefits your work, please kindly cite [this publication](https://ieeex
(Author's copy is available [here](https://vast.ucar.edu/pdfs/SPERR_IPDPS.pdf).)

## Presentations
- FZ Workshop Hands-on: Feb 15 2024, Sarasota, FL. ([handout and examples](https://vast.ucar.edu/pdfs/Li_FZ2024.pdf))
- SC'23 Tutorial on lossy scientific data compression: Nov 13 2023, Denver CO. ([slides](https://vast.ucar.edu/pdfs/Li_SC23_Slides.pdf))
- IPDPS'23 Lossy Scientific Data Compression With SPERR: May 18 2023, St. Petersburg, FL. ([slides](https://vast.ucar.edu/pdfs/Li_IPDPS23_Slides.pdf))
4 changes: 0 additions & 4 deletions src/SPERR/cli11.patch

This file was deleted.

1 change: 1 addition & 0 deletions src/SPERR/handout/compile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xelatex -shell-escape main.tex
Loading
Loading