Skip to content

Commit

Permalink
Use allreduce instead of allgather
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Hirschvogel committed Oct 3, 2024
1 parent 8995369 commit c906216
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ambit_fe/mor/mor_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ def prepare_rob(self):
self.partition_pod_space()

# gather Phi
phi_arr = self.pb.comm.allgather(self.Phi)
self.Phi = np.zeros(self.Phi.shape)
for i in range(len(phi_arr)):
self.Phi += phi_arr[i]
self.Phi = self.pb.comm.allreduce(self.Phi)

if self.orthogonalize_rom_basis:
ts = time.time()
Expand Down

0 comments on commit c906216

Please sign in to comment.