[Yt-svn] yt-commit r946 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Nov 18 00:29:40 PST 2008
Author: mturk
Date: Tue Nov 18 00:29:40 2008
New Revision: 946
URL: http://yt.spacepope.org/changeset/946
Log:
Not really pleased with these changes, but the InMemory sutff needs the tuple
reversing to be cancelled, and I don't seem to be getting the hang of
Py_SetProgramName, so I've added a sys._parallel munging. This fills me with
shame.
Modified:
trunk/yt/lagos/DataReadingFuncs.py
trunk/yt/lagos/ParallelTools.py
Modified: trunk/yt/lagos/DataReadingFuncs.py
==============================================================================
--- trunk/yt/lagos/DataReadingFuncs.py (original)
+++ trunk/yt/lagos/DataReadingFuncs.py Tue Nov 18 00:29:40 2008
@@ -158,9 +158,10 @@
import enzo
sl = [slice(None), slice(None), slice(None)]
sl[axis] = slice(coord, coord + 1)
- sl = tuple(reversed(sl))
+ #sl = tuple(reversed(sl))
+ sl = tuple(sl)
bsl = (slice(3,-3), slice(3,-3), slice(3,-3))
- return enzo.grid_data[grid.id][field][bsl][sl].swapaxes(0,2)
+ return enzo.grid_data[grid.id][field][bsl][sl]#.swapaxes(0,2)
def getExceptionInMemory():
return KeyError
Modified: trunk/yt/lagos/ParallelTools.py
==============================================================================
--- trunk/yt/lagos/ParallelTools.py (original)
+++ trunk/yt/lagos/ParallelTools.py Tue Nov 18 00:29:40 2008
@@ -28,8 +28,8 @@
import yt.logger
import itertools, sys
-if os.path.basename(sys.executable) in ["mpi4py"] \
- or "--parallel" in sys.argv:
+if os.path.basename(sys.executable) in ["mpi4py", "embed_enzo"] \
+ or "--parallel" in sys.argv or '_parallel' in dir(sys):
from mpi4py import MPI
parallel_capable = (MPI.COMM_WORLD.size > 1)
if parallel_capable:
@@ -258,6 +258,7 @@
mylog.debug("Opening MPI Broadcast on %s", MPI.COMM_WORLD.rank)
data = MPI.COMM_WORLD.Bcast(data, root=0)
MPI.COMM_WORLD.Barrier()
+ return data
def _should_i_write(self):
if not parallel_capable: return True
More information about the yt-svn
mailing list