diff --git a/Partition.py b/Partition.py index 5ec2df370563b0bf412550d9c87972e47187cc74..1d7b68ac32be998610662c8d43b38f11bf496940 100644 --- a/Partition.py +++ b/Partition.py @@ -543,3 +543,8 @@ class partition : ERROR("Unforessen rank for variable to summed over the core region.") sys.exit() return y + # + # Function to find max value over the entire domain + # + def domainmax(self, x) : + return max(self.comm.allgather(x)) diff --git a/RoutingPreProc.py b/RoutingPreProc.py index 668a11257d2a60559fd71e9f90765f061cecd79d..9c2066ce709613430d1b82013ec2e7f2afad2be0 100644 --- a/RoutingPreProc.py +++ b/RoutingPreProc.py @@ -139,7 +139,7 @@ else : # nbpt = len(sub_index) sub_pts = np.array(list(len(sub_index[i][0]) for i in range(len(sub_index)))) -nbvmax = max(sub_pts) +nbvmax = part.domainmax(max(sub_pts)) print("nbpt : ", nbpt) print("nbvmax : ", nbvmax) print("nbasmax : ", nbasmax)