Works on Mac OS 10.11.6, HDF5 1.8.17
- Download and install dependencies like zlib, openmpi. Use homebrew.
- Download source tarball from http://www.hdfgroup.org/HDF5/release/obtain5.html
- Configure Makefile using the following command:
$ CC=/usr/local/bin/mpicc ./configure --with-zlib=/usr/local/opt --disable-fortran --prefix=/usr/local/ --enable-shared --enable-parallel
This will configure a shared library HDF5 installation that uses MPI. Note that if homebrew was used to install zlib, remember to supply the proper path pointing to the zlib library. 3. Compile and install HDF5.
$ make
$ make check
$ sudo make install
- Check HDF5 installation using
h5pcc --showconfig
on the command line.
- Download and install numpy. Use pip or conda.
- Declare environmental variables used by h5py
$ export CC=mpicc
$ export HDF5_MPI="ON"
- Configure using setup.py and install.
$ python setup.py configure --mpi
$ python setup.py install
- Check the installation using the demo code on this page