Skip to content

Commit d9850f5

Browse files
committed
Fixed broadcast error for spaces
1 parent 3ea90f0 commit d9850f5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/function.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,12 @@ where
459459
// on the last process
460460

461461
let global_size = {
462-
let mut tmp = 0;
462+
let mut tmp = dof_n;
463463
if rank == comm.size() - 1 {
464-
comm.this_process().scatter_into_root(&dof_n, &mut tmp);
464+
comm.this_process().broadcast_into(&mut tmp);
465465
} else {
466-
comm.process_at_rank(comm.size() - 1).scatter_into(&mut tmp);
466+
comm.process_at_rank(comm.size() - 1)
467+
.broadcast_into(&mut tmp);
467468
}
468469

469470
tmp

0 commit comments

Comments
 (0)