[yt-users] strange error with StarMassMsun
Geoffrey So
gsiisg at gmail.com
Tue Feb 18 15:13:54 PST 2014
The new change worked flawlessly, thanks John.
From
G.S.
On Mon, Feb 17, 2014 at 12:38 PM, Geoffrey So <gsiisg at gmail.com> wrote:
> Thanks, will give it a try and let you know.
>
> From
> G.S.
>
> Sent from my iPhone
>
> > On Feb 17, 2014, at 5:01 AM, John Wise <jwise at physics.gatech.edu> wrote:
> >
> > Hi Geoffrey,
> >
> > This pull request has been merged, so all you have to do is update your
> yt installation on Stampede now.
> >
> > Thanks,
> > John
> >
> >> On 02/16/2014 08:00 PM, John Wise wrote:
> >> Hi Geoffrey,
> >>
> >> This will happen if you're running with 32-bit precision in Enzo, and
> >> the particle fields except for position will be in 32-bit. However, the
> >> CICDeposit3 routine expects 64-bit floats as input. I've created a pull
> >> request that fixes this bug.
> >>
> >>
> https://bitbucket.org/yt_analysis/yt/pull-request/706/input-enzo-deposited-fields-should-be/diff
> >>
> >>
> >> You can go ahead and test it by pulling my changeset and recompiling.
> >>
> >> hg pull -r f9127d6 https://bitbucket.org/jwise77/yt
> >> hg up
> >>
> >> Please see if this works for you and comment on the PR page.
> >>
> >> Cheers,
> >> John
> >>
> >>> On 02/14/2014 05:12 PM, Geoffrey So wrote:
> >>> I'm getting a strange error when executing the command
> >>>
> >>> starmass = ell.quantities['TotalQuantity']('StarMassMsun')[0]
> >>>
> >>> This is on Stampede, and on my laptop running OSX I did not get the
> same
> >>> error. Has anyone else seen something similar?
> >>>
> >>> From
> >>> G.S.
> >>>
> >>> In [100]: ell.quantities['TotalQuantity']('StarMassMsun')
> >>>
> ---------------------------------------------------------------------------
> >>>
> >>> ValueError Traceback (most recent call
> >>> last)
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/scripts/iyt in <module>()
> >>> ----> 1 ell.quantities['TotalQuantity']('StarMassMsun')
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
> >>>
> >>> in __call__(self, *args, **kwargs)
> >>> 80 self._data_source.pf.h.io
> >>> <http://data_source.pf.h.io>)
> >>> 81 if lazy_reader and not self.force_unlazy:
> >>> ---> 82 return self._call_func_lazy(args, kwargs)
> >>> 83 else:
> >>> 84 return self._call_func_unlazy(args, kwargs)
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
> >>>
> >>> in _call_func_lazy(self, args, kwargs)
> >>> 87 self.retvals = [ [] for i in range(self.n_ret)]
> >>> 88 for gi,g in enumerate(self._get_grids()):
> >>> ---> 89 rv = self.func(GridChildMaskWrapper(g,
> >>> self._data_source), *args, **kwargs)
> >>> 90 if not iterable(rv): rv = (rv,)
> >>> 91 for i in range(self.n_ret):
> >>> self.retvals[i].append(rv[i])
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
> >>>
> >>> in _TotalQuantity(data, fields)
> >>> 703 totals = []
> >>> 704 for field in fields:
> >>> --> 705 if data[field].size < 1:
> >>> 706 totals.append(0.0)
> >>> 707 continue
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
> >>>
> >>> in __getitem__(self, item)
> >>> 48 def __getitem__(self, item):
> >>> 49 if item not in self.local_cache:
> >>> ---> 50 data =
> >>> self.data_source._get_data_from_grid(self.grid, item)
> >>> 51 self.local_cache[item] = data
> >>> 52 return self.local_cache[item]
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/data_containers.pyc
> >>>
> >>> in save_state(self, grid, field, *args, **kwargs)
> >>> 79 old_keys = grid.field_data.keys()
> >>> 80 grid.field_parameters = self.field_parameters
> >>> ---> 81 tr = func(self, grid, field, *args, **kwargs)
> >>> 82 grid.field_parameters = old_params
> >>> 83 grid.field_data = YTFieldData( [(k, grid.field_data[k])
> >>> for k in old_keys] )
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/data_containers.pyc
> >>>
> >>> in _get_data_from_grid(self, grid, field)
> >>> 2644 return np.array([f[i,:][pointI] for i in range(3)])
> >>> 2645 else:
> >>> -> 2646 tr = grid[field]
> >>> 2647 if tr.size == 1: # dx, dy, dz, cellvolume
> >>> 2648 tr = tr * np.ones(grid.ActiveDimensions,
> >>> dtype='float64')
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
> in
> >>> __getitem__(self, key)
> >>> 145 """
> >>> 146 if key not in self.field_data:
> >>> --> 147 self.get_data(key)
> >>> 148 return self.field_data[key]
> >>> 149
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
> in
> >>> get_data(self, field, convert)
> >>> 188 else: raise
> >>> 189 else:
> >>> --> 190 self._generate_field(field)
> >>> 191 return self.field_data[field]
> >>> 192
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
> in
> >>> _generate_field(self, field)
> >>> 133 self[field] = temp_array[sl]
> >>> 134 else:
> >>> --> 135 self[field] = self.pf.field_info[field](self)
> >>> 136 else: # Can't find the field, try as it might
> >>> 137 raise exceptions.KeyError(field)
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/field_info_container.pyc
> >>>
> >>> in __call__(self, data)
> >>> 383 ii = self.check_available(data)
> >>> 384 original_fields = data.keys() # Copy
> >>> --> 385 dd = self._function(self, data)
> >>> 386 dd *= self._convert_function(data)
> >>> 387 for field_name in data.keys():
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/universal_fields.pyc
> >>>
> >>> in _StarMass(field, data)
> >>> 439
> >>> 440 def _StarMass(field,data):
> >>> --> 441 return data["star_density"] * data["CellVolume"]
> >>> 442 add_field("StarMassMsun", units=r"M_{\odot}",
> >>> 443 function=_StarMass,
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
> in
> >>> __getitem__(self, key)
> >>> 145 """
> >>> 146 if key not in self.field_data:
> >>> --> 147 self.get_data(key)
> >>> 148 return self.field_data[key]
> >>> 149
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
> in
> >>> get_data(self, field, convert)
> >>> 188 else: raise
> >>> 189 else:
> >>> --> 190 self._generate_field(field)
> >>> 191 return self.field_data[field]
> >>> 192
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
> in
> >>> _generate_field(self, field)
> >>> 133 self[field] = temp_array[sl]
> >>> 134 else:
> >>> --> 135 self[field] = self.pf.field_info[field](self)
> >>> 136 else: # Can't find the field, try as it might
> >>> 137 raise exceptions.KeyError(field)
> >>>
> >>>
> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/field_info_container.pyc
> >>>
> >>> in __call__(self, data)
> >>> 383 ii = self.check_available(data)
> >>> 384 original_fields = data.keys() # Copy
> >>> --> 385 dd = self._function(self, data)
> >>> 386 dd *= self._convert_function(data)
> >>> 387 for field_name in data.keys():
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/frontends/enzo/fields.pyc in
> >>> _spdensity(field, data)
> >>> 360 blank,
> >>> np.array(data.LeftEdge).astype(np.float64),
> >>> 361
> >>> np.array(data.ActiveDimensions).astype(np.int32),
> >>> --> 362 np.float64(data['dx']))
> >>> 363 return blank
> >>> 364
> >>>
> >>> /home1/01041/tg802953/dev-yt/src/yt-hg/yt/utilities/lib/CICDeposit.so
> in
> >>> yt.utilities.lib.CICDeposit.CICDeposit_3
> >>> (yt/utilities/lib/CICDeposit.c:1643)()
> >>>
> >>> ValueError: Buffer dtype mismatch, expected 'float64_t' but got 'float'
> >>>
> >>>
> >>> _______________________________________________
> >>> yt-users mailing list
> >>> yt-users at lists.spacepope.org
> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> > --
> > John Wise
> > Assistant Professor of Physics
> > Center for Relativistic Astrophysics, Georgia Tech
> > http://cosmo.gatech.edu
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140218/9673ff7e/attachment.html>
More information about the yt-users
mailing list