[Yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Sat Jun 4 12:13:32 PDT 2011
2 new changesets in yt:
http://bitbucket.org/yt_analysis/yt/changeset/f9c54e658b4c/
changeset: f9c54e658b4c
branches:
user: MatthewTurk
date: 2011-06-04 21:09:43
summary: Fixing corner case for parallel derived quantities and removing debug
statements for quadtree merging in parallel.
affected #: 2 files (128 bytes)
--- a/yt/data_objects/derived_quantities.py Fri Jun 03 01:07:08 2011 -0400
+++ b/yt/data_objects/derived_quantities.py Sat Jun 04 15:09:43 2011 -0400
@@ -109,7 +109,10 @@
rv = []
for my_list in self.retvals:
data = na.array(my_list).transpose()
- rv.append(self._mpi_catarray(data).transpose())
+ old_shape = data.shape
+ data = self._mpi_catarray(data).transpose()
+ if len(data.shape) != old_shape: data = data.squeeze()
+ rv.append(data)
self.retvals = rv
def _call_func_unlazy(self, args, kwargs):
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py Fri Jun 03 01:07:08 2011 -0400
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py Sat Jun 04 15:09:43 2011 -0400
@@ -1293,13 +1293,13 @@
while mask < size:
if (mask & rank) != 0:
target = (rank & ~mask) % size
- print "SENDING FROM %02i to %02i" % (rank, target)
+ #print "SENDING FROM %02i to %02i" % (rank, target)
self._send_quadtree(target, qt, tgd, args)
#qt = self._recv_quadtree(target, tgd, args)
else:
target = (rank | mask)
if target < size:
- print "RECEIVING FROM %02i on %02i" % (target, rank)
+ #print "RECEIVING FROM %02i on %02i" % (target, rank)
qto = self._recv_quadtree(target, tgd, args)
merge_quadtrees(qt, qto)
del qto
http://bitbucket.org/yt_analysis/yt/changeset/241708eb4e5a/
changeset: 241708eb4e5a
branches:
user: MatthewTurk
date: 2011-06-04 21:10:12
summary: Merging
affected #: 5 files (1.0 KB)
--- a/yt/frontends/flash/data_structures.py Sat Jun 04 15:09:43 2011 -0400
+++ b/yt/frontends/flash/data_structures.py Sat Jun 04 15:10:12 2011 -0400
@@ -294,6 +294,21 @@
[self._find_parameter("real", "%smin" % ax) for ax in 'xyz'])
self.domain_right_edge = na.array(
[self._find_parameter("real", "%smax" % ax) for ax in 'xyz'])
+
+ # Determine domain dimensions
+ try:
+ nxb = self._find_parameter("integer", "nxb", handle = self._handle)
+ nyb = self._find_parameter("integer", "nyb", handle = self._handle)
+ nzb = self._find_parameter("integer", "nzb", handle = self._handle)
+ except KeyError:
+ nxb, nyb, nzb = [int(self._handle["/simulation parameters"]['n%sb' % ax])
+ for ax in 'xyz']
+ nblockx = self._find_parameter("integer", "nblockx", handle = self._handle)
+ nblocky = self._find_parameter("integer", "nblockx", handle = self._handle)
+ nblockz = self._find_parameter("integer", "nblockx", handle = self._handle)
+ self.domain_dimensions = \
+ na.array([nblockx*nxb,nblocky*nyb,nblockz*nzb])
+
if self._flash_version == 7:
self.current_time = float(
self._handle["simulation parameters"][:]["time"])
--- a/yt/gui/reason/bottle_mods.py Sat Jun 04 15:09:43 2011 -0400
+++ b/yt/gui/reason/bottle_mods.py Sat Jun 04 15:10:12 2011 -0400
@@ -152,6 +152,9 @@
print "WARNING: %s has no _route_prefix attribute. Not notifying."
continue
w._route_prefix = token
+ repl.activate()
+ while not repl.execution_thread.queue.empty():
+ time.sleep(1)
print
print
print "============================================================================="
@@ -195,7 +198,7 @@
import yt.utilities.rocket as rocket
server_type = YTRocketServer
log = logging.getLogger('Rocket')
- log.setLevel(logging.INFO)
+ log.setLevel(logging.WARNING)
kwargs = {'timeout': 600, 'max_threads': 2}
if repl is not None:
repl.server = YTRocketServer.server_info
--- a/yt/gui/reason/extdirect_repl.py Sat Jun 04 15:09:43 2011 -0400
+++ b/yt/gui/reason/extdirect_repl.py Sat Jun 04 15:10:12 2011 -0400
@@ -106,24 +106,24 @@
def run(self):
while 1:
- print "Checking for a queue ..."
+ #print "Checking for a queue ..."
try:
task = self.queue.get(True, 10)
except (Queue.Full, Queue.Empty):
if self.repl.stopped: return
continue
- print "Received the task", task
+ #print "Received the task", task
if task['type'] == 'code':
self.execute_one(task['code'], task['hide'])
self.queue.task_done()
elif task['type'] == 'add_widget':
- print "Adding new widget"
+ #print "Adding new widget"
self.queue.task_done()
new_code = self.repl._add_widget(
task['name'], task['widget_data_name'])
- print "Got this command:", new_code
+ #print "Got this command:", new_code
self.repl.execute(new_code, hide=True)
- print "Executed!"
+ #print "Executed!"
def execute_one(self, code, hide):
self.repl.executed_cell_texts.append(code)
@@ -237,13 +237,13 @@
self.execute("data_objects = []", hide = True)
self.locals['load_script'] = ext_load_script
self.locals['deliver_image'] = deliver_image
+
+ def activate(self):
self._setup_logging_handlers()
-
# Setup our heartbeat
self.last_heartbeat = time.time()
self._check_heartbeat()
self.execution_thread.start()
- if self.debug: time.sleep(3)
def exception_handler(self, exc):
result = {'type': 'cell_results',
--- a/yt/utilities/command_line.py Sat Jun 04 15:09:43 2011 -0400
+++ b/yt/utilities/command_line.py Sat Jun 04 15:10:12 2011 -0400
@@ -1120,6 +1120,7 @@
bottle.debug()
uuid_serve_functions(open_browser=opts.open_browser,
port=int(opts.port), repl=hr)
+
def do_remote(self, subcmd, opts):
import getpass, sys, socket, time, webbrowser
--- a/yt/visualization/profile_plotter.py Sat Jun 04 15:09:43 2011 -0400
+++ b/yt/visualization/profile_plotter.py Sat Jun 04 15:10:12 2011 -0400
@@ -37,7 +37,7 @@
BinnedProfile1D, \
BinnedProfile2D
from .plot_types import ProfilePlot, PhasePlot
-from .tick_locators import LogLocator
+from .tick_locators import LogLocator, LinearLocator
from yt.utilities.logger import ytLogger as mylog
def invalidate_plot(f):
@@ -57,6 +57,8 @@
def calculate_ticks(self):
if self.scale == 'log':
locator = LogLocator()
+ elif self.scale == 'linear':
+ locator = LinearLocator()
else:
raise NotImplementedError
self.ticks = locator(*self.bounds)
@@ -86,10 +88,12 @@
if self.x_spec.scale == 'log' and \
self.y_spec.scale == 'log':
func = axes.loglog
- elif self.x_spec == 'log':
+ elif self.x_spec.scale == 'log':
func = axes.semilogx
- elif self.y_spec == 'log':
+ elif self.y_spec.scale == 'log':
func = axes.semilogy
+ else:
+ func = axes.plot
if self.plot_spec is None:
kwargs = {}
else:
@@ -277,7 +281,7 @@
self._current_field = field_z
self.profile = profile
self.scale = {True:'log', False:'linear'}.get(
- data_source.pf.field_info[field_z], "log")
+ data_source.pf.field_info[field_z].take_log, "log")
self._setup_plot()
def _setup_plot(self):
@@ -404,7 +408,7 @@
self._current_field = field_y
self.profile = profile
self.scale = {True:'log', False:'linear'}.get(
- data_source.pf.field_info[field_y], "log")
+ data_source.pf.field_info[field_y].take_log, "log")
self._setup_plot()
def _setup_plot(self):
@@ -421,7 +425,7 @@
ny = (self.profile[self._current_field] > 0)
mi = self.profile[self._current_field][ny].min()
else:
- mi = self.profile[self._current_field][ny].min()
+ mi = self.profile[self._current_field].min()
ma = self.profile[self._current_field].max()
yax.bounds = (mi, ma)
yax.scale = self.scale
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