File size: 12,119 Bytes
808f9b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
---
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](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 `36891dee00`). `metadata/` holds
the original SDRBench property and template files. Kept in sync automatically by
[szcompressor/sdrbench](https://github.com/szcompressor/sdrbench).

- **Data provider:** HACC team (ECP ExaSky); https://www.alcf.anl.gov/science/case-studies/opencosmo-community-portal-cosmological-simulations
- **Size:** 150.2 GB in 8 variant(s)
- **Format:** raw little-endian binary, C order (slowest dimension first); dtype and shape per field below

**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

```bash
pip install "sdrbench[sz3]"     # sdrbench + pysz (SZ3)
```

```python
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:

```python
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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/multi-timesteps/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/multi-timesteps/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/multi-timesteps/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/multi-timesteps/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](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXASKY/HACC/multi-timesteps/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:

```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.