s3d / README.md
ayzk's picture
Update dataset card and file table
65350db verified
|
Raw History Blame Contribute Delete
5.22 kB
metadata
license: other
license_name: sdrbench
license_link: https://sdrbench.github.io/
pretty_name: 'SDRBench: S3D'
tags:
  - scientific-data
  - lossy-compression
  - sdrbench
  - hpc
  - sz3
configs:
  - config_name: files
    data_files: files.jsonl
    default: true

SDRBench — S3D

Statistically planar premixed methane flame simulated with S3D (SNL): 11 variables on 500 x 500 x 500, double precision, little-endian.

Raw binary arrays, not an Arrow/Parquet dataset. datasets.load_dataset("sdrbench/s3d") returns the table of files (files.jsonl: path, dtype, shape, sha256). Read the arrays with the sdrbench package or hf_hub_download + numpy as shown below.

This repository is an unmodified mirror of the S3D data of SDRBench, the Scientific Data Reduction Benchmark. The originals are hosted by Argonne National Laboratory on Globus; every archive was unpacked and its files uploaded byte-for-byte (sha256 verified) (revision e1229e5a46). metadata/ holds the original SDRBench property and template files. Kept in sync automatically by szcompressor/sdrbench.

  • Data provider: Hemanth Kolla (SNL, hnkolla@sandia.gov)
  • Size: 55.0 GB in 1 variant(s)
  • Format: raw little-endian binary, C order (slowest dimension first); dtype and shape per field below

Usage

pip install "sdrbench[sz3]"     # sdrbench + pysz (SZ3)
import numpy as np
import sdrbench
from pysz import sz, szConfig, szErrorBoundMode

ds = sdrbench.dataset("s3d")
print(ds.fields)
x = ds["CH4/1.1000E-03"]                     # numpy array, dtype <f8, shape (500, 500, 500)

# compress with SZ3 (pysz) at a 1e-3 value-range-relative error bound
conf = szConfig()
conf.errorBoundMode = szErrorBoundMode.REL
conf.relErrorBound = 1e-3
compressed, ratio = sz.compress(np.ascontiguousarray(x), conf)
y, _ = sz.decompress(compressed, x.dtype.type, x.shape)
max_err, psnr, nrmse = sz.verify(np.asarray(x), y)
print(f"ratio {ratio:.1f}x, PSNR {psnr:.1f} dB, max error {max_err:.3g}")

Files are fetched on first use (in parallel with ds.download("data/")) and cached, pinned to the revision of the installed sdrbench release; if Hugging Face is unreachable the package falls back to the original archive on Globus. Existing local SDRBench copies can be used with sdrbench.dataset("s3d", root="/path").

Without the package, with huggingface_hub and numpy only:

from huggingface_hub import hf_hub_download
import numpy as np
p = hf_hub_download("sdrbench/s3d", "s3d/stat_planar.1.1000E-03.field.d64", repo_type="dataset", revision="e1229e5a4606482948fd3e8272a1dd1ab645dc7e")
x = np.fromfile(p, dtype="<f8").reshape((11, 500, 500, 500))[0]  # CH4 -> (500, 500, 500)

Variants and fields

default (default)

sdrbench.dataset("s3d", "default") — folder s3d/ — 7 files, 55.0 GB, from SDRBENCH-S3D.tar.gz.

5 time steps (t = 1.1e-3 ... 2.995e-3 s). Each stored file holds all 11 variables (variable x z x y x x); fields are zero-copy views per variable: mass fractions CH4, O2, CO, CO2, H2O, N2; temperature T (normalized by 120 K), pressure P (by 1.41837e5 Pa), velocities U, V, W (by 347.2 m/s).

11 variable(s) x 5 steps (1.1000E-03 ... 2.9950E-03): ds.series("CH4"), ds["CH4", "1.1000E-03"].

Field dtype Shape (C order) File
CH4/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [0]
O2/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [1]
CO/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [2]
CO2/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [3]
H2O/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [4]
N2/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [5]
T/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [6]
P/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [7]
U/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [8]
V/1.1000E-03 <f8 500 x 500 x 500 s3d/stat_planar.1.1000E-03.field.d64 [9]
... 45 more

Other files: s3d/flist.txt, s3d/template.txt

Citation

Please cite SDRBench; sdrbench cite s3d prints it:

@inproceedings{zhao2020sdrbench,
  title     = {{SDRBench}: Scientific Data Reduction Benchmark for Lossy Compressors},
  author    = {Zhao, Kai and Di, Sheng and Liang, Xin and Li, Sihuan and Tao, Dingwen and Chen, Zizhong and Cappello, Franck},
  booktitle = {2020 IEEE International Conference on Big Data (Big Data)},
  pages     = {2716--2724},
  year      = {2020}
}

License and terms

The data are distributed by the SDRBench team for research use under the terms of the original data providers listed above (see the SDRBench website); please acknowledge them as requested. Rights remain with the data providers.