qmcpack / README.md
ayzk's picture
Update dataset card and file table
dff84aa verified
|
Raw History Blame Contribute Delete
4.78 kB
---
license: other
license_name: sdrbench
license_link: https://sdrbench.github.io/
pretty_name: "SDRBench: QMCPACK"
tags:
- scientific-data
- lossy-compression
- sdrbench
- hpc
- sz3
configs:
- config_name: files
data_files: files.jsonl
default: true
---
# SDRBench — QMCPACK
Many-body ab initio Quantum Monte Carlo (QMCPACK): 288 einspline orbitals on a 115 x 69 x 69 grid, single precision, little-endian.
> **Raw binary arrays, not an Arrow/Parquet dataset.** `datasets.load_dataset("sdrbench/qmcpack")` 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 QMCPACK data of [SDRBench](https://sdrbench.github.io/datasets.html), 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 `1518533bae`). `metadata/` holds
the original SDRBench property and template files. Kept in sync automatically by
[szcompressor/sdrbench](https://github.com/szcompressor/sdrbench).
- **Data provider:** QMCPACK performance test; contact Ye Luo (yeluo@anl.gov)
- **Size:** 630.7 MB in 2 variant(s)
- **Format:** raw little-endian binary, C order (slowest dimension first); dtype and shape per field below
## Usage
```bash
pip install "sdrbench[sz3]" # sdrbench + pysz (SZ3)
```
```python
import numpy as np
import sdrbench
from pysz import sz, szConfig, szErrorBoundMode
ds = sdrbench.dataset("qmcpack") # default variant "preconditioned"
print(ds.fields)
x = ds["einspline"] # numpy array, dtype <f4, shape (288, 115, 69, 69)
# 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("qmcpack", root="/path")`.
Without the package, with `huggingface_hub` and numpy only:
```python
from huggingface_hub import hf_hub_download
import numpy as np
p = hf_hub_download("sdrbench/qmcpack", "115x69x69x288/einspline_115_69_69_288.f32", repo_type="dataset", revision="1518533baeeffa9dad33910ff639029bfac91f88")
x = np.fromfile(p, dtype="<f4").reshape((115, 69, 69, 288)).transpose(3, 0, 1, 2) # -> (288, 115, 69, 69)
```
## Variants and fields
### `preconditioned` (default)
`sdrbench.dataset("qmcpack", "preconditioned")` — derived from `115x69x69x288/`, no extra files.
(orbital, x, y, z) = (288, 115, 69, 69): each orbital is a contiguous, smooth 3D block. This is the layout of the SDRBench command examples (einspline_288_115_69_69.pre.f32); computed on load from the stored file.
| Field | dtype | Shape (C order) | File |
|---|---|---|---|
| `einspline` | `<f4` | 288 x 115 x 69 x 69 | `115x69x69x288/einspline_115_69_69_288.f32` |
### `original`
`sdrbench.dataset("qmcpack", "original")` — folder `115x69x69x288/` — 3 files, 630.7 MB, from [SDRBENCH-QMCPack.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/QMCPACK/SDRBENCH-QMCPack.tar.gz).
The layout QMCPACK uses in memory: (x, y, z, orbital) = (115, 69, 69, 288), orbital index fastest.
| Field | dtype | Shape (C order) | File |
|---|---|---|---|
| `einspline` | `<f4` | 115 x 69 x 69 x 288 | `115x69x69x288/einspline_115_69_69_288.f32` |
Other files: `115x69x69x288/SDRBENCH-QMCPACK-115x69x69x288-property.txt`, `115x69x69x288/template_data.txt`
## Citation
Please cite SDRBench; `sdrbench cite qmcpack` prints it:
```bibtex
@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](https://sdrbench.github.io/datasets.html)); please acknowledge them as
requested. Rights remain with the data providers.