Skip to content

Commit

Permalink
Squashed 'src/SPERR/' changes from d766b3b97..16fa20741
Browse files Browse the repository at this point in the history
16fa20741 minor changes, preparing for v0.8.2 release (#244)
e9c9e1743 Revert "provide a no output file warning message"
32ac9b4a2 Revert "bump version to 0.8.2"
f3e7ac0fd bump version to 0.8.2
b25ef3ba1 provide a no output file warning message
bd7c72653 remove the NewlySig enum item, and also provide the C++ standard to use as a CMake option
76cf82608 simplify a bit
b0495d143 Update README.md (#241)
aee3236fa minor
015e791e2 minor
c12f5e038 remove clang-tidy badge
724dee7d6 clang-format-14
3d54dc5e2 clang-format
1cc239569 clang-tidy
791d5565b add tail ellison code to code_S() (#240)
ef135ee9d minor
59aa63c3d update CLI11 version
fe9df24e0 Use __cplusplus version check, and minor improve on the bitmask. (#239)
ddb02cdee clang-format
14075a017 minor
47519acb2 remove an unused include
5c3b3cfb6 use countr_zero (#238)
fe698e1ea minor
414efdf41 link Fortran wrapper
f6ddfa742 Division (#236)
d87bdd051 add CMAKE_INSTALL_PREFIX in README
f05b93c87 finish improved has_true() function (#235)
9695e7a0c Revert "use a width parameter in Bitmask"
09db8b5df Revert "change function names"
04a3eb1ce change function names
524761981 use a width parameter in Bitmask
d53dfb077 minor
4ba73ac24 add exhaustive Bitmask::has_true() test
0d659895a add Bitmask::has_true() function
07ee5c7c9 Minor work on README (#232)
f7f2031f9 add examples in PDF format (#231)
08bc43f2a misc (#230)
c1a5e155d bump cli11 version

git-subtree-dir: src/SPERR
git-subtree-split: 16fa20741e5f5ad19127470c93d61d28cc980fae
  • Loading branch information
t20100 committed Aug 29, 2024
1 parent 3c11a79 commit 70798b2
Show file tree
Hide file tree
Showing 35 changed files with 1,099 additions and 181 deletions.
4 changes: 2 additions & 2 deletions .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 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 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 cli11.patch

This file was deleted.

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

0 comments on commit 70798b2

Please sign in to comment.