# Problem with 3D in parallel

**URL:** <https://fenicsproject.discourse.group/t/problem-with-3d-in-parallel/5912>\
**Category:** Uncategorized\
**Created:** [May 31, 2021, 1:45pm UTC](https://fenicsproject.discourse.group/t/problem-with-3d-in-parallel/5912 "2021-05-31T13:45:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![1115](https://avatars.discourse-cdn.com/v4/letter/1/9f8e36/32.png) [@1115](https://fenicsproject.discourse.group/u/1115)\
**Post date:** [May 31, 2021, 1:45pm UTC](https://fenicsproject.discourse.group/t/problem-with-3d-in-parallel/5912/1 "2021-05-31T13:45:43Z")

</div>

Dear all, I use the HDF5 file to run the MPI, but the result is really bad.

my HDF5.py:

> from dolfin import \*  
> from mpi4py import MPI as mpi
> 
> mesh = Mesh(“New3D\_Denticles61000.xml”)  
> markers = MeshFunction(“size\_t”, mesh, “New3D\_Denticles61000\_physical\_region.xml”)  
> boundaries = MeshFunction(“size\_t”, mesh, “New3D\_Denticles61000\_facet\_region.xml”)  
> hdf = HDF5File(MPI.comm\_world, “2New3D\_Denticles61000.h5”, “w”)  
> hdf.write(mesh, “/mesh”)  
> hdf.write(markers, “/markers”)  
> hdf.write(boundaries, “/boundaries”)

parallel.py:(min. file)

> from dolfin import \*  
> from mshr import \*  
> import numpy as np  
> from mpi4py import MPI as mpi
> 
> QUAD\_DEG = 2\*k  
> dx = dx(metadata={“quadrature\_degree”:QUAD\_DEG})
> 
> mesh = Mesh()  
> hdf = HDF5File(MPI.comm\_world, “New3D\_Denticles61000.h5”, “r”)  
> hdf.read(mesh, “/mesh”, False)  
> markers = MeshFunction(“size\_t”, mesh, mesh.topology().dim())  
> hdf.read(markers, “/markers”)  
> boundaries = MeshFunction(“size\_t”, mesh, mesh.topology().dim()-1)  
> hdf.read(boundaries, “/boundaries”)
> 
> #Define boundary conditions  
> bcu\_inflow = DirichletBC(V.sub(0), Expression(inflow\_profile, degree=1), boundaries, 1)  
> bcu\_walls = DirichletBC(V.sub(0), Constant((0, 0, 0)), boundaries, 3)  
> bcu\_walls2 = DirichletBC(V.sub(0).sub(2), Constant(0), boundaries, 4)  
> bcu\_denticles = DirichletBC(V.sub(0), Constant((0, 0, 0)), boundaries, 5)  
> bcp\_outflow = DirichletBC(V.sub(1), Constant(0), boundaries, 2)  
> bcs = [bcu\_inflow, bcu\_walls, bcu\_walls2, bcu\_denticles, bcp\_outflow]

I run the

> mpirun -np 8 python3 file.py

The result (red circle is weird):

 ![擷取](https://global.discourse-cdn.com/free1/uploads/fenicsproject1/original/2X/5/5a987137dd04f099da9451c5e9af4ce80cd1c448.jpeg)

My question is how I can fix the problem. Thanks for anyone’s help!

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [June 1, 2021, 8:19am UTC](https://fenicsproject.discourse.group/t/problem-with-3d-in-parallel/5912/2 "2021-06-01T08:19:11Z")

</div>

You need to provide a minimal working example that reproduces the problem. See: [Read before posting: How do I get my question answered? - #4 by nate](https://fenicsproject.discourse.group/t/read-before-posting-how-do-i-get-my-question-answered/21/4) for a list of examples following our guidelines.

To me it looks like you are visualizing the partitioning surfaces (each local part of the mesh has an interior boundary to other processes), which is simply a post-processing issue.
