Skip to content

Commit

Permalink
Remove world barriers and use correct mpi communicator
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Feb 22, 2024
1 parent dc2e144 commit 9486b69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/example3/example3_multimeshMPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def compute_local_range(comm, N: int):
result_folder.mkdir(exist_ok=True)
for species_name, species in modelCur.sc.items:
results[species_name] = d.XDMFFile(
modelCur.mpi_comm_world, str(result_folder / f"{species_name}.xdmf")
)
d.MPI.comm_self, str(result_folder / f"{species_name}.xdmf"))

results[species_name].parameters["flush_output"] = True
results[species_name].write(modelCur.sc[species_name].u["u"], modelCur.t)

Expand Down
2 changes: 1 addition & 1 deletion smart/mesh_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def meshSizeCallback(dim, tag, x, y, z, lc):
gmsh.model.mesh.generate(3)
gmsh.write(str(gmsh_file))
gmsh.finalize()
MPI.COMM_WORLD.Barrier()
comm.Barrier()
# return dolfin mesh of max dimension (parent mesh) and marker functions mf2 and mf3
dmesh, mf2, mf3 = gmsh_to_dolfin(str(gmsh_file), tmp_folder, 3, comm)
# remove tmp mesh and tmp folder
Expand Down

0 comments on commit 9486b69

Please sign in to comment.