Skip to content

Commit

Permalink
Fix(?) race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed Dec 4, 2023
1 parent 0b2b295 commit c68bea8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fipy/meshes/gmshMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2185,10 +2185,13 @@ def _test(self):
... os.close(ftmp)
... else:
... posFile = None
>>> parallelComm.Barrier()
>>> posFile = parallelComm.bcast(posFile)
>>> parallelComm.Barrier()
>>> f = openPOSFile(posFile, mode='w') # doctest: +GMSH
>>> f.write(vol) # doctest: +GMSH
>>> f.close() # doctest: +GMSH
>>> parallelComm.Barrier()
>>> f = open(posFile, mode='r') # doctest: +GMSH
>>> l = f.readlines() # doctest: +GMSH
Expand Down Expand Up @@ -2244,6 +2247,7 @@ def _test(self):
>>> print(numerix.allclose(a1, a2)) # doctest: +GMSH
True
>>> parallelComm.Barrier()
>>> if parallelComm.procID == 0:
... os.remove(posFile)
Expand Down

0 comments on commit c68bea8

Please sign in to comment.