brahmap.math.parallel_norm¶ Source code in brahmap/math/linalg.py 9 10 11 12 13def parallel_norm(x: np.ndarray): sqnorm = x.dot(x) sqnorm = MPI_UTILS.comm.allreduce(sqnorm) ret = np.sqrt(sqnorm) return ret