python(3)-h5py not mpi-aware

Nish Aravamudan nish.aravamudan at canonical.com
Thu Jun 30 15:38:57 UTC 2016


On 30.06.2016 [16:17:31 +0200], Lars Bungum wrote:
> Dear all,
> 
> running this script:
> 
> import mpi4py
> from mpi4py import MPI
> import h5py
> 
> rank = MPI.COMM_WORLD.rank  # The process ID (integer 0-3 for 4-process run)
> 
> print(rank)
> f = h5py.File('parallel_test.hdf5', 'w', driver='mpio', comm=MPI.COMM_WORLD)
> 
> dset = f.create_dataset('test', (4,), dtype='i')
> dset[rank] = rank
> 
> f.close()
> 
> yields this result, for both python versions for as well 14.04 as 16.04
> (Kubuntu):
> 
> $ mpirun -np 4 python3 multiproc_hdf5_mpi4py.py
> Traceback (most recent call last):
>   File "multiproc_hdf5_mpi4py.py", line 1, in <module>
>     import mpi4py
> ImportError: No module named 'mpi4py'

Do you have either python-mpi4py or python3-mpi4py installed?

-Nish

--
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd




More information about the Ubuntu-devel-discuss mailing list