H5Z-MANS is an HDF5 filter plugin for MANS compression.
This repository provides:
- An HDF5 shared-library filter plugin loadable via
HDF5_PLUGIN_PATH - The MANS filter (
id = 32032) - Benchmark and test executables for MANS, ZSTD, SZ3, GZIP, FSE, and uncompressed I/O
- MPI-based HDF5 read/write microbenchmarks
- Support for unsigned integer datasets (
u16andu32in the MANS path)
The following filter IDs are used by the test tools:
MANS:32032FSE:32028ZSTD:32015SZ3:32024GZIP/DEFLATE:1(built-in HDF5)
Notes:
MANSis provided by this repository throughlibH5Z-MANS.so.FSErequires the corresponding FSE plugin to be available inHDF5_PLUGIN_PATH(for example,libH5Zfse.so).
Build from the repository root with the CPU backend enabled:
cmake -S . -B build -DTARGET_PLATFORM=cpu -DBUILD_HDF5_PLUGIN=ON
cmake --build build -jTo also build GPU-related binaries, set TARGET_PLATFORM to one of:
cpu_nvcpu_amdall
build/bin/plugins/libH5Z-MANS.sobuild/bin/plugins/libH5Z-NONE.sobuild/bin/h5z-mans/mans_data_genbuild/bin/h5z-mans/mans_write,mans_readbuild/bin/h5z-mans/none_write,none_readbuild/bin/h5z-mans/sz3_write,sz3_readbuild/bin/h5z-mans/zstd_write,zstd_readbuild/bin/h5z-mans/fse_write,fse_readbuild/bin/h5z-mans/fse_ans_write,fse_ans_readbuild/bin/h5z-mans/fse_huffman_write,fse_huffman_read
H5Z-MANS does not expose thread counts through the public cd_values interface. Instead, thread counts are selected automatically in set_local based on chunk size and dataset mapping dimensions, using an autotuned CSV file.
./build/bin/cpu/cpu_mans_autotune \
--data-size-mb-list 0.00390625,0.0078125,1,4 \
--csv ./build/thread_sweep.csv \
--out ./build/best_threads.csv- If
MANS_THREAD_CSVis unset, the plugin looks forbest_threads.csvin the current working directory. - If no CSV is found, or no matching entry exists, the plugin prints a warning once and falls back to the default thread setting:
32,32.
Notes:
cpu_mans_autotunecurrently generates syntheticu16data internally.- For the broader CPU autotuning and benchmarking workflow, see the top-level
README.md.
./build/bin/h5z-mans/mans_data_gen \
[--config gen.cfg] [--synth-config synth.cfg] \
[--output-dir DIR] [--output-name name.bin] [--output-prefix NAME] \
[--size-per-rank-mb MB] [--ranks N] [--jobs N] \
[--ratio-constant R] [--dtype u16|u32]Before running:
export HDF5_PLUGIN_PATH=/workspace/MANS/build/bin/plugins
export MANS_THREAD_CSV=/workspace/MANS/build/best_threads.csvExample:
mpirun -n 1 ./build/bin/h5z-mans/mans_write --chunk-size-mb 4
mpirun -n 1 ./build/bin/h5z-mans/mans_readThe same --chunk-size-mb option is supported by:
none_writesz3_writezstd_writefse_writefse_ans_writefse_huffman_write
See tools/H5Z-MANS/example.conf for the public MANS filter parameter file.
The public cd_values interface currently exposes only mode. Datatype, chunk geometry, and thread selection are derived internally in set_local.
For the full workflow and additional autotuning guidance, see the top-level README.md.