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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Aug 14 05:47:05 PDT 2013


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/82d8da3063aa/
Changeset:   82d8da3063aa
Branch:      yt
User:        samskillman
Date:        2013-08-05 23:16:56
Summary:     Better error handling when the user is attempting to use parallelism without
mpi4py installed.
Affected #:  1 file

diff -r f936432ed45df5f59f1691ec56f64ee31bb85a46 -r 82d8da3063aa4afb60e70068e98ced72a99bca23 yt/startup_tasks.py
--- a/yt/startup_tasks.py
+++ b/yt/startup_tasks.py
@@ -36,9 +36,11 @@
 def turn_on_parallelism():
     try:
         from mpi4py import MPI
-        parallel_capable = (MPI.COMM_WORLD.size > 1)
-    except ImportError:
-        parallel_capable = False
+    except ImportError as e:
+        mylog.error("Warning: Attempting to turn on parallelism, " +
+                    "but mpi4py import failed. Try pip install mpi4py.")
+        raise e
+    parallel_capable = (MPI.COMM_WORLD.size > 1)
     if parallel_capable:
         mylog.info("Global parallel computation enabled: %s / %s",
                    MPI.COMM_WORLD.rank, MPI.COMM_WORLD.size)


https://bitbucket.org/yt_analysis/yt/commits/d4505b36d9ce/
Changeset:   d4505b36d9ce
Branch:      yt
User:        MatthewTurk
Date:        2013-08-14 14:47:01
Summary:     Merged in samskillman/yt (pull request #562)

Better parallelism error handling
Affected #:  1 file

diff -r 43730c73a2de006b6412380da341761d510c5646 -r d4505b36d9ce03074b8a4a7df32b639268936a86 yt/startup_tasks.py
--- a/yt/startup_tasks.py
+++ b/yt/startup_tasks.py
@@ -36,9 +36,11 @@
 def turn_on_parallelism():
     try:
         from mpi4py import MPI
-        parallel_capable = (MPI.COMM_WORLD.size > 1)
-    except ImportError:
-        parallel_capable = False
+    except ImportError as e:
+        mylog.error("Warning: Attempting to turn on parallelism, " +
+                    "but mpi4py import failed. Try pip install mpi4py.")
+        raise e
+    parallel_capable = (MPI.COMM_WORLD.size > 1)
     if parallel_capable:
         mylog.info("Global parallel computation enabled: %s / %s",
                    MPI.COMM_WORLD.rank, MPI.COMM_WORLD.size)

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