Skip to content

Commit 46848ca

Browse files
author
Wood, Tony
committed
Actually, this bit is superfluous.
1 parent e922ede commit 46848ca

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

py/orbit/bunch_utils/collect_bunch.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,10 @@ def collect_bunch(
146146
for attr in bunch.bunchAttrIntNames():
147147
bunch_dict["attributes"][attr] = np.int32(bunch.bunchAttrInt(attr))
148148

149-
_fill_and_flush_memmap(coords_memmap, bunch, start_row, local_rows)
150-
151-
if mpi_size == 1:
152-
coords_memmap = np.memmap(fname, dtype=dtype, mode="r", shape=coords_shape)
153-
bunch_dict["coords"] = np.array(coords_memmap)
154-
return bunch_dict
155-
156149
orbit_mpi.MPI_Barrier(mpi_comm)
157150

158-
coords_memmap = np.memmap(fname, dtype=dtype, mode="r+", shape=coords_shape)
151+
if mpi_rank != 0:
152+
coords_memmap = np.memmap(fname, dtype=dtype, mode="r+", shape=coords_shape)
159153

160154
_fill_and_flush_memmap(coords_memmap, bunch, start_row, local_rows)
161155

0 commit comments

Comments
 (0)