Skip to content

Latest commit

 

History

History
58 lines (50 loc) · 1.64 KB

ndlarflow.org

File metadata and controls

58 lines (50 loc) · 1.64 KB

Installation of h5flow

<<install-h5flow>> Prepare developing environment including hdf5 library and its MPI support (openmpi) on Debian 12.5.

apt-get install git pkg-config \
        openmpi-bin libhdf5-openmpi-dev \
        python3 python3-dev python3-venv

Prepare virtual environment of python3 on Debian 12.5.

export CC=mpicc
export HDF5_MPI="ON"
mkdir env
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

with requirements.txt having the content:

h5py --no-binary=h5py
mpi4py
pyyaml-include==1.4.1
h5flow @ git+https://github.com/peter-madigan/h5flow@d2864e8
pytest_mpi

Prepare for jupyter notebook kernel.

source venv/bin/activate
pip install ipykernel
python -m ipykernel install --user --name larnd2x2 --display-name "LAr ND 2x2"

See also in kernal and environments.

hdf5

Use h5py

Installation

Remove the line below in requirements.txt in section install-h5flow,

h5flow @ git+https://github.com/peter-madigan/h5flow@d2864e8

Then repeat all commands in section install-h5flow.

Principle in mind

Group works like dictionaries, and datasets work like NumpPy arrays.

How to open a file

The object h5py.File behave like a Python dictionary. Do the following:

import h5py
f = h5py.File("test.h5", "r")

How to access data

Group