File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -392,10 +392,19 @@ function multicast_impl!(
392392 @assert rcv. comm === snd. comm
393393 comm = snd. comm
394394 root = source - 1
395- if MPI. Comm_rank (comm) == root
396- rcv. item = snd. item
395+ if isbitstype (T)
396+ if MPI. Comm_rank (comm) == root
397+ rcv. item = snd. item
398+ end
399+ MPI. Bcast! (rcv. item_ref,root,comm)
400+ else
401+ if MPI. Comm_rank (comm) == root
402+ rcv. item_ref[] = MPI. bcast (snd. item,comm;root)
403+ else
404+ rcv. item_ref[] = MPI. bcast (nothing ,comm;root)
405+ end
397406 end
398- MPI . Bcast! ( rcv. item_ref,root,comm)
407+ rcv
399408end
400409
401410function multicast_impl! (
@@ -408,6 +417,7 @@ function multicast_impl!(
408417 rcv. item = snd. item
409418 end
410419 MPI. Bcast! (rcv. item,root,comm)
420+ rcv
411421end
412422
413423function scan! (op,b:: MPIArray ,a:: MPIArray ;init,type)
You can’t perform that action at this time.
0 commit comments