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

SDRBench — HACC

Cosmology N-body simulation (HACC, ECP ExaSky): particle coordinates xx, yy, zz and velocities vx, vy, vz as separate 1D arrays, single precision, little-endian.

Raw binary arrays, not an Arrow/Parquet dataset. datasets.load_dataset("sdrbench/hacc") 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 HACC 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 36891dee00). metadata/ holds the original SDRBench property and template files. Kept in sync automatically by szcompressor/sdrbench.

Citation requested by the data provider: Please cite Heitmann et al., Astrophys. J. Suppl. 252 (2021) 2, 19 (https://inspirehep.net/literature/1799008) when using HACC data.

Usage

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

ds = sdrbench.dataset("hacc")                # default variant "medium"
print(ds.fields)
x = ds["vx"]                     # numpy array, dtype <f4, shape (280953867,)

# 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("hacc", 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/hacc", "medium/vx.f32", repo_type="dataset", revision="36891dee003a1aa08bb7da3c3e6b90badcd661e6")
x = np.fromfile(p, dtype="<f4").reshape((280953867,))

Variants and fields

medium (default)

sdrbench.dataset("hacc", "medium") — folder medium/ — 8 files, 6.7 GB, from EXASKY-HACC-data-medium-size.tar.gz.

One snapshot with 280,953,867 particles.

Field dtype Shape (C order) File
vx <f4 280953867 medium/vx.f32
vy <f4 280953867 medium/vy.f32
vz <f4 280953867 medium/vz.f32
xx <f4 280953867 medium/xx.f32
yy <f4 280953867 medium/yy.f32
zz <f4 280953867 medium/zz.f32

Other files: medium/EXASKY-HACC-data-medium-size-property.txt, medium/EXASKY-HACC-data-medium-size-template_data.txt

big

sdrbench.dataset("hacc", "big") — folder big/ — 8 files, 25.8 GB, from EXASKY-HACC-data-big-size.tar.gz.

One snapshot with 1,073,726,487 particles.

Field dtype Shape (C order) File
vx <f4 1073726487 big/vx.f32
vy <f4 1073726487 big/vy.f32
vz <f4 1073726487 big/vz.f32
xx <f4 1073726487 big/xx.f32
yy <f4 1073726487 big/yy.f32
zz <f4 1073726487 big/zz.f32

Other files: big/EXASKY-HACC-data-big-size-property.txt, big/template_data_big-size.txt

sbig

sdrbench.dataset("hacc", "sbig") — folder sbig/ — 3 files, 19.5 GB, from SDRBENCH-EXASKY-HACC-data-sbig-size.tar.gz.

One region (1/768) of time step 499 of a trillion-particle run: coordinates only.

Field dtype Shape (C order) File
xx <f4 1621417608 sbig/27035-xx.f32
yy <f4 1621417608 sbig/27035-yy.f32
zz <f4 1621417608 sbig/27035-zz.f32

region1

sdrbench.dataset("hacc", "region1") — folder multi-timesteps/1840/ — 304 files, 19.5 GB, from 1840.tar.gz.

Region 1840: coordinates xx, yy, zz over about 100 time steps (the particle count changes per step) and the particle IDs.

4 variable(s) x 101 steps (00042 ... 00499): ds.series("xx"), ds["xx", "00042"].

Field dtype Shape (C order) File
xx/00042 <f4 16141859 multi-timesteps/1840/00042-xx.f32
yy/00042 <f4 16141859 multi-timesteps/1840/00042-yy.f32
zz/00042 <f4 16141859 multi-timesteps/1840/00042-zz.f32
xx/00043 <f4 16140933 multi-timesteps/1840/00043-xx.f32
yy/00043 <f4 16140933 multi-timesteps/1840/00043-yy.f32
zz/00043 <f4 16140933 multi-timesteps/1840/00043-zz.f32
xx/00044 <f4 16139797 multi-timesteps/1840/00044-xx.f32
yy/00044 <f4 16139797 multi-timesteps/1840/00044-yy.f32
zz/00044 <f4 16139797 multi-timesteps/1840/00044-zz.f32
xx/00045 <f4 16138878 multi-timesteps/1840/00045-xx.f32
... 294 more

region2

sdrbench.dataset("hacc", "region2") — folder multi-timesteps/20000/ — 304 files, 19.6 GB, from 20000.tar.gz.

Region 20000: coordinates xx, yy, zz over about 100 time steps (the particle count changes per step) and the particle IDs.

4 variable(s) x 101 steps (00042 ... 00499): ds.series("xx"), ds["xx", "00042"].

Field dtype Shape (C order) File
xx/00042 <f4 16153547 multi-timesteps/20000/00042-xx.f32
yy/00042 <f4 16153547 multi-timesteps/20000/00042-yy.f32
zz/00042 <f4 16153547 multi-timesteps/20000/00042-zz.f32
xx/00043 <f4 16152817 multi-timesteps/20000/00043-xx.f32
yy/00043 <f4 16152817 multi-timesteps/20000/00043-yy.f32
zz/00043 <f4 16152817 multi-timesteps/20000/00043-zz.f32
xx/00044 <f4 16152061 multi-timesteps/20000/00044-xx.f32
yy/00044 <f4 16152061 multi-timesteps/20000/00044-yy.f32
zz/00044 <f4 16152061 multi-timesteps/20000/00044-zz.f32
xx/00045 <f4 16151268 multi-timesteps/20000/00045-xx.f32
... 294 more

region3

sdrbench.dataset("hacc", "region3") — folder multi-timesteps/24120/ — 304 files, 19.6 GB, from 24120.tar.gz.

Region 24120: coordinates xx, yy, zz over about 100 time steps (the particle count changes per step) and the particle IDs.

4 variable(s) x 101 steps (00042 ... 00499): ds.series("xx"), ds["xx", "00042"].

Field dtype Shape (C order) File
xx/00042 <f4 16156722 multi-timesteps/24120/00042-xx.f32
yy/00042 <f4 16156722 multi-timesteps/24120/00042-yy.f32
zz/00042 <f4 16156722 multi-timesteps/24120/00042-zz.f32
xx/00043 <f4 16156136 multi-timesteps/24120/00043-xx.f32
yy/00043 <f4 16156136 multi-timesteps/24120/00043-yy.f32
zz/00043 <f4 16156136 multi-timesteps/24120/00043-zz.f32
xx/00044 <f4 16155596 multi-timesteps/24120/00044-xx.f32
yy/00044 <f4 16155596 multi-timesteps/24120/00044-yy.f32
zz/00044 <f4 16155596 multi-timesteps/24120/00044-zz.f32
xx/00045 <f4 16154795 multi-timesteps/24120/00045-xx.f32
... 294 more

region4

sdrbench.dataset("hacc", "region4") — folder multi-timesteps/30210/ — 304 files, 19.6 GB, from 30210.tar.gz.

Region 30210: coordinates xx, yy, zz over about 100 time steps (the particle count changes per step) and the particle IDs.

4 variable(s) x 101 steps (00042 ... 00499): ds.series("xx"), ds["xx", "00042"].

Field dtype Shape (C order) File
xx/00042 <f4 16160806 multi-timesteps/30210/00042-xx.f32
yy/00042 <f4 16160806 multi-timesteps/30210/00042-yy.f32
zz/00042 <f4 16160806 multi-timesteps/30210/00042-zz.f32
xx/00043 <f4 16160342 multi-timesteps/30210/00043-xx.f32
yy/00043 <f4 16160342 multi-timesteps/30210/00043-yy.f32
zz/00043 <f4 16160342 multi-timesteps/30210/00043-zz.f32
xx/00044 <f4 16159646 multi-timesteps/30210/00044-xx.f32
yy/00044 <f4 16159646 multi-timesteps/30210/00044-yy.f32
zz/00044 <f4 16159646 multi-timesteps/30210/00044-zz.f32
xx/00045 <f4 16158914 multi-timesteps/30210/00045-xx.f32
... 294 more

region6

sdrbench.dataset("hacc", "region6") — folder multi-timesteps/4529/ — 304 files, 19.9 GB, from 4529.tar.gz.

Region 4529: coordinates xx, yy, zz over about 100 time steps (the particle count changes per step) and the particle IDs.

4 variable(s) x 101 steps (00042 ... 00499): ds.series("xx"), ds["xx", "00042"].

Field dtype Shape (C order) File
xx/00042 <f4 16211251 multi-timesteps/4529/00042-xx.f32
yy/00042 <f4 16211251 multi-timesteps/4529/00042-yy.f32
zz/00042 <f4 16211251 multi-timesteps/4529/00042-zz.f32
xx/00043 <f4 16211574 multi-timesteps/4529/00043-xx.f32
yy/00043 <f4 16211574 multi-timesteps/4529/00043-yy.f32
zz/00043 <f4 16211574 multi-timesteps/4529/00043-zz.f32
xx/00044 <f4 16212106 multi-timesteps/4529/00044-xx.f32
yy/00044 <f4 16212106 multi-timesteps/4529/00044-yy.f32
zz/00044 <f4 16212106 multi-timesteps/4529/00044-zz.f32
xx/00045 <f4 16212596 multi-timesteps/4529/00045-xx.f32
... 294 more

Citation

Please cite SDRBench and the data provider (see above); sdrbench cite hacc 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.