h5pyvol

Abstract data model for HDF5 Python virtual object layers


Keywords
hdf5, vol, h5py, numpy, python
License
AGPL-3.0
Install
pip install h5pyvol==1.0.dev0

Documentation

H5PyVOL

This is a beta version of a generic Python virtual object layer (VOL) for HDF5. It is providing some easily implementable APIs to create new python VOLs.

The library is built upon the develop branch of HDF5.

NB: at moment, not all VOL functions are implemented. (All the capabilities of sci-swift are currently supported, it is in the roadmap to implement all the missing functionalities).

Python part (module H5PyVOL)

In order to develop an easily pluggable python VOL, an abstract data model and one basic example implementation are provided.

Containerized environment

The docker folder contains instructions to build a container for testing purposes (shipped with all dependencies). All the project's docker images - including one client image for each supported object store - can be built by executing the script docker-build.sh.

Install

Prerequisites

  • HDF5 (develop version)
  • MPI (recommended: mpich)
  • Python 3.7
  • NumPy

The H5PyVOL plugin will be installed in the path specified by the environment variable $HDF5_PLUGIN_PATH if set, otherwise in the HDF5 plugin default directory (/usr/local/hdf5/lib/plugin/). Make sure the install path is writable.

Cmake install (version >= 3.15)

mkdir build &&
cd build &&
cmake .. &&
make install

Makefile install (NB: review include paths in the Makefile)

make &&
make install

The H5PyVol module can be installed by following the instructions in the python folder.

Usage

Once installed both plugin and python package, is it needed to set the following environment variables:

  • HDF5_VOL_CONNECTOR='H5PyVOL'
  • H5PyVOLModule='package_name_of_developed_VOL'
  • H5PyVOLClass='class_name_of_developed_VOL'

Demo

Example with an in-memory simple example implementation.

After installation with Cmake (version >= 3.15)

cd build
export HDF5_VOL_CONNECTOR='H5PyVOL'
export H5PyVOLModule='python_vol'
export H5PyVOLClass='VOL'
./vol

After installation with Makefile

make apps
cd build
export HDF5_VOL_CONNECTOR='H5PyVOL'
export H5PyVOLModule='python_vol'
export H5PyVOLClass='VOL'
./vol