This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Opening a HDF5File using a single process

+1 vote

Hi,

I am using the Hierarchical Data Format to store meshes and solutions and it works great. I am wondering if it is possible to open/read the files using a single process, in an environment where there are multiple processes. I.e.

from dolfin import MPI, HDF5File

if MPI.process_number() == 0:
    f = HDF5File("u.h5","r")

"mpirun -n 2 python mpitest.py" will hang, presumably because it is waiting for the other processes to get involved even though they have been excluded.

My question: Is there a clean way to give a mesh or function defined on multiple processes to a single process?

asked Apr 22, 2014 by sixtysymbols FEniCS User (2,280 points)

1 Answer

+1 vote
 
Best answer

There isn't yet a clean way to move meshes, etc between processes. We have recently added the MPI communicator as an argument to many classes, which will make varying the number processes, moving a distributed mesh to one process, etc, possible in the near future.

answered Apr 23, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
selected Apr 23, 2014 by sixtysymbols

Is there an 'unclean' workaround in the meantime?

...