Hi Josh,

The reason that's not working is that there is still only one storage item (the sto variable) per iteration of the loop.  You could keep both things if you make sto.result a list object and just append each of those things to that list.

Britton

On Sun, May 24, 2015 at 11:12 AM, Joshua Wall <joshua.e.wall@gmail.com> wrote:
Dear users,


     This there a simple way to store multiple values at each step using parallel_objects? I'm doing:

########################################################
yt.enable_parallelism()
num_procs = 4
plot = glob.glob(./plot*)
my_storage = {}

for sto, p in yt.parallel_objects(plots, num_procs, my_storage):

  sto.result_id = 'energy' + p
  sto.resutl     = dd["total_energy"]

  sto.result_id = 'Px' + p
  sto.result     = dd["total_mom_x"]

######################################################

which is just overwriting my energy with the momentum. I also tried to just set to different dictionaries without passing it to yt.parallel_objects as storage, but of course each proc as only a local copy then.

Cordially,

Josh

_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org