[Yt-svn] yt-commit r785 - trunk/yt/lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Wed Sep 17 07:59:25 PDT 2008


Author: mturk
Date: Wed Sep 17 07:59:23 2008
New Revision: 785
URL: http://yt.spacepope.org/changeset/785

Log:
If it isn't setting parallel_capable, we act like it's just not parallel
capable.  Makes sense, right?



Modified:
   trunk/yt/lagos/ParallelTools.py

Modified: trunk/yt/lagos/ParallelTools.py
==============================================================================
--- trunk/yt/lagos/ParallelTools.py	(original)
+++ trunk/yt/lagos/ParallelTools.py	Wed Sep 17 07:59:23 2008
@@ -30,19 +30,19 @@
 try:
     from mpi4py import MPI
     parallel_capable = (MPI.COMM_WORLD.size > 1)
-    mylog.info("Parallel computation enabled: %s / %s",
-               MPI.COMM_WORLD.rank, MPI.COMM_WORLD.size)
-    ytcfg["yt","__parallel_rank"] = str(MPI.COMM_WORLD.rank)
-    ytcfg["yt","__parallel_size"] = str(MPI.COMM_WORLD.size)
-    ytcfg["yt","__parallel"] = "True"
-    # Now let's make sure we have the right options set.
-    if MPI.COMM_WORLD.rank > 0:
-        if ytcfg.getboolean("lagos","serialize"):
-            ytcfg["lagos","onlydeserialize"] = "True"
-        if ytcfg.getboolean("yt","LogFile"):
-            ytcfg["yt","LogFile"] = "False"
-            yt.logger.disable_file_logging()
-            
+    if parallel_capable:
+        mylog.info("Parallel computation enabled: %s / %s",
+                   MPI.COMM_WORLD.rank, MPI.COMM_WORLD.size)
+        ytcfg["yt","__parallel_rank"] = str(MPI.COMM_WORLD.rank)
+        ytcfg["yt","__parallel_size"] = str(MPI.COMM_WORLD.size)
+        ytcfg["yt","__parallel"] = "True"
+        # Now let's make sure we have the right options set.
+        if MPI.COMM_WORLD.rank > 0:
+            if ytcfg.getboolean("lagos","serialize"):
+                ytcfg["lagos","onlydeserialize"] = "True"
+            if ytcfg.getboolean("yt","LogFile"):
+                ytcfg["yt","LogFile"] = "False"
+                yt.logger.disable_file_logging()
 except ImportError:
     parallel_capable = False
 



More information about the yt-svn mailing list