11.6. Bcast command¶
-
Bcast
(*data)¶ Broadcast information from processor 0 to all processors.
data
(list (int))can be a list of integers data
(list (float))can be a list of floats data
(str)can be a string
Note
Run the same command to receive data sent from pid = 0.
For example,
if pid == 0:
data1 = []
data2 = []
ops.Bcast(*data1)
ops.Bcast(*data2)
if pid != 0:
data1 = ops.Bcast()
data2 = ops.Bcast()