MCPcopy Create free account
hub / github.com/mpi4py/mpi4py / end

Method end

demo/sequential/seq.py:38–52  ·  view source on GitHub ↗

End a sequential execution of a section of code

(self)

Source from the content-addressed store, hash-verified

36 comm.Send([None, "B"], rank + 1, tag)
37
38 def end(self):
39 """
40 End a sequential execution of a section of code
41 """
42 comm = self.comm
43 size = comm.Get_size()
44 if size == 1:
45 return
46 rank = comm.Get_rank()
47 ng = self.ng
48 tag = self.tag
49 if rank == (size - 1) or (rank % ng) == (ng - 1):
50 comm.Send([None, "B"], (rank + 1) % size, tag)
51 if rank == 0:
52 comm.Recv([None, "B"], size - 1, tag)

Callers 1

__exit__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected