Question

I would appreciate if anyone could guide me towards a solution/understanding for the following error message :

f = h5py.File(filename, 'w', driver='mpio', comm=comm)
File "/usr/lib/python2.7/dist-packages/h5py/_hl/files.py", line 149, in __init__
fapl = make_fapl(driver,libver,**kwds)
File "/usr/lib/python2.7/dist-packages/h5py/_hl/files.py", line 37, in make_fapl
raise ValueError('Unknown driver type "%s"' % driver)
ValueError: Unknown driver type "mpio"

I installed h5py using the ubuntu software center. (I ran h5cc -showconfig and noted that parallel HDF5 was enabled.)

I am running on a macbook air with core 2 duo, with only one core enabled for a virtual desktop of ubuntu 13.04.

Was it helpful?

Solution

The version of h5py that comes with Ubuntu was not built against parallel HDF5. That's why you can't use the MPI driver. You need to build h5py by hand. The most convenient way is to use a virtualenv environment, so that the parallel h5py version does not interfere with the Ubuntu-installed version. All you have to do is:

  1. Unpack the h5py source code from h5py.org
  2. Make sure you are in a virtualenv (or don't, if you prefer to install h5py globally. But then you better uninstall h5py in Ubuntu)
  3. $ export CC=mpicc
  4. $ python setup.py build --mpi
  5. $ python setup.py install

That's it. See http://docs.h5py.org/en/latest/mpi.html for details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top