[yt-users] parallel quantities
Matthew Turk
matthewturk at gmail.com
Tue Jul 23 11:08:20 PDT 2013
Hi Dave,
Usually this means that it's not getting a field -- sorry for the
obtuse error message. What happens if you try specifying
preload=False, or if you query MagneticEnergy directly?
-Matt
On Tue, Jul 23, 2013 at 1:58 PM, David Collins <dcollins4096 at gmail.com> wrote:
> Hi, all--
>
> I have an odd error trying to get some averaged quantities in parallel. I'm
> trying to do
>
> pf.h.all_data().quantities['WeightedAverageQuantity']('MagneticEnergy','CellVolume')
>
> on two processors, and I get the following error:
>
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 396, in __call__
> dd *= self._convert_function(data)
> TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'
>
> It works fine in serial, and it works fine if I use "VelocityMagnitude"
> instead of "MagneticEnergy"
>
> Does anyone have an idea about what I'm doing wrong?
>
> I run it as
>> mpirun -np 2 python p23_go.py --parallel
>
> and the full trace back is:
>
> Traceback (most recent call last):
> File "ptmp.py", line 5, in <module>
> bavg =
> ad.quantities['WeightedAverageQuantity']('MagneticEnergy','CellVolume')
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/derived_quantities.py",
> line 87, in __call__
> Traceback (most recent call last):
> File "ptmp.py", line 5, in <module>
> bavg =
> ad.quantities['WeightedAverageQuantity']('MagneticEnergy','CellVolume')
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/derived_quantities.py",
> line 87, in __call__
> self.func(e, *args, **kwargs)
> self.func(e, *args, **kwargs)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/derived_quantities.py",
> line 203, in _WeightedAverageQuantity
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/derived_quantities.py",
> line 203, in _WeightedAverageQuantity
> num = (data[field] * data[weight]).sum()
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 257, in __missing__
> num = (data[field] * data[weight]).sum()
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 257, in __missing__
> vv = FI[item](self)
> vv = FI[item](self)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 395, in __call__
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 395, in __call__
> dd = self._function(self, data)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/universal_fields.py",
> line 1016, in _MagneticEnergy
> dd = self._function(self, data)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/universal_fields.py",
> line 1016, in _MagneticEnergy
> return (data["Bx"]**2 + data["By"]**2 + data["Bz"]**2)/(8*np.pi)
> return (data["Bx"]**2 + data["By"]**2 + data["Bz"]**2)/(8*np.pi)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 257, in __missing__
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 257, in __missing__
> vv = FI[item](self)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 396, in __call__
> vv = FI[item](self)
> File
> "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/data_objects/field_info_container.py",
> line 396, in __call__
> dd *= self._convert_function(data)
> TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'
> dd *= self._convert_function(data)
> TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'
>
> Thanks a ton!
>
>
> --
> -- Sent from a computer.
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
More information about the yt-users
mailing list