[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Mar 26 06:17:54 PDT 2013


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/1266fa57e30e/
Changeset:   1266fa57e30e
Branch:      yt
User:        xarthisius
Date:        2013-03-26 12:59:25
Summary:     [decompose] initialize 'p_size', skip decomposition for one proc. Fixes #537
Affected #:  1 file

diff -r c087b133da9ccdcc5b08d92f3a7d6a94efb6fcaa -r 1266fa57e30ef96b31e4fd6cf21a3ab0f839b11e yt/utilities/decompose.py
--- a/yt/utilities/decompose.py
+++ b/yt/utilities/decompose.py
@@ -109,6 +109,10 @@
     fac = factorize_number(pieces)
     nfactors = len(fac[:, 2])
     best = 0.0
+    p_size = np.ones(3, dtype=np.int)
+    if pieces == 1:
+        return p_size
+
     while np.all(fac[:, 2] > 0):
         ldom = np.ones(3, dtype=np.int)
         for nfac in range(nfactors):


https://bitbucket.org/yt_analysis/yt/commits/5dcd737e56c4/
Changeset:   5dcd737e56c4
Branch:      yt
User:        xarthisius
Date:        2013-03-26 13:40:20
Summary:     [decompose] Avoid integer overflow while calculating 'ideal_bsize'
Affected #:  1 file

diff -r 1266fa57e30ef96b31e4fd6cf21a3ab0f839b11e -r 5dcd737e56c43faf694bddd7830df42263341b5d yt/utilities/decompose.py
--- a/yt/utilities/decompose.py
+++ b/yt/utilities/decompose.py
@@ -69,8 +69,8 @@
     """ Evaluate longest to shortest edge ratio
         BEWARE: lot's of magic here """
     eff_dim = (n_d > 1).sum()
-    ideal_bsize = eff_dim * (pieces * np.product(n_d) ** (eff_dim - 1)
-                             ) ** (1.0 / eff_dim)
+    exp = float(eff_dim - 1) / float(eff_dim)
+    ideal_bsize = eff_dim * pieces ** (1.0 / eff_dim) * np.product(n_d) ** exp
     mask = np.where(n_d > 1)
     nd_arr = np.array(n_d, dtype=np.float64)[mask]
     bsize = int(np.sum(ldom[mask] / nd_arr * np.product(nd_arr)))

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list