Skip to content

Commit

Permalink
Fixed broadcast error for spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tbetcke committed Feb 6, 2025
1 parent 3ea90f0 commit d9850f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,12 @@ where
// on the last process

let global_size = {
let mut tmp = 0;
let mut tmp = dof_n;
if rank == comm.size() - 1 {
comm.this_process().scatter_into_root(&dof_n, &mut tmp);
comm.this_process().broadcast_into(&mut tmp);
} else {
comm.process_at_rank(comm.size() - 1).scatter_into(&mut tmp);
comm.process_at_rank(comm.size() - 1)
.broadcast_into(&mut tmp);
}

tmp
Expand Down

0 comments on commit d9850f5

Please sign in to comment.