Hi, I'm encountering an int/long error in a new installation of yt, python, computer cluster etc: (yt-x86_64)[pjumper@hpcmanage ~]$ python covering_grid_test.py yt : [WARNING ] 2012-03-19 18:42:59,135 Setting 1.0 in code units to be 1.0 cm yt : [WARNING ] 2012-03-19 18:42:59,135 No time units. Setting 1.0 = 1 second. yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: current_time = 2.26390632737e+14 yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_dimensions = [256, 256, 256] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_left_edge = [ -3.09000000e+18 -3.09000000e+18 -3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_right_edge = [ 3.09000000e+18 3.09000000e+18 3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field density to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field xmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field ymom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field zmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field eden to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field frac1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhof1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhofe1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phi to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phicorr to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test0 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test2 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field log_den to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field pressure to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field xvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field yvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field zvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field ieng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field keng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field cvt to list of fields yt : [INFO ] 2012-03-19 18:42:59,296 Setting right_edge to [1.0, 1.0, 1.0] Traceback (most recent call last): File "covering_grid_test.py", line 20, in <module> dims=[128,128,128], File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ data_containers.py", line 3331, in __init__ self._refresh_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ data_containers.py", line 3348, in _refresh_data AMR3DData._refresh_data(self) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ data_containers.py", line 307, in _refresh_data self.get_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ data_containers.py", line 3355, in get_data self._get_list_of_grids() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ data_containers.py", line 3343, in _get_list_of_grids self.right_edge + buffer, self.level) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/ object_finding_mixin.py", line 214, in get_box_grids_below_level self.grid_levels, mask) File "misc_utilities.pyx", line 91, in yt.utilities.amr_utils.get_box_grids_below_level (yt/utilities/ amr_utils.c:58776) ValueError: Buffer dtype mismatch, expected 'int32_t' but got 'long' It is possible to partially get around this by declaring all the input ints (e.g. dims=[128, 128, 128]) to covering_grid as type int32. However, doing this for all yt calls seems tedious. Is there an easier way of dealing with this issue? Thanks! Stella
Hi Stella, Thanks for the bug report -- in looking over the arguments to covering_grid, the only one that is not manually cast (already) is left_edge, which is the second argument (i.e., level, left_edge, dims, ...). Can you tell me if just casting *that* one to int32 fixes it? If so, I'll commit/push that change. Best, Matt On Mon, Mar 19, 2012 at 12:02 PM, Stella Offner <soffner@cfa.harvard.edu> wrote:
Hi,
I'm encountering an int/long error in a new installation of yt, python, computer cluster etc:
(yt-x86_64)[pjumper@hpcmanage ~]$ python covering_grid_test.py yt : [WARNING ] 2012-03-19 18:42:59,135 Setting 1.0 in code units to be 1.0 cm yt : [WARNING ] 2012-03-19 18:42:59,135 No time units. Setting 1.0 = 1 second. yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: current_time = 2.26390632737e+14 yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_dimensions = [256, 256, 256] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_left_edge = [ -3.09000000e+18 -3.09000000e+18 -3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_right_edge = [ 3.09000000e+18 3.09000000e+18 3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field density to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field xmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field ymom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field zmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field eden to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field frac1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhof1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhofe1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phi to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phicorr to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test0 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test2 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field log_den to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field pressure to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field xvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field yvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field zvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field ieng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field keng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field cvt to list of fields yt : [INFO ] 2012-03-19 18:42:59,296 Setting right_edge to [1.0, 1.0, 1.0] Traceback (most recent call last): File "covering_grid_test.py", line 20, in <module> dims=[128,128,128], File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3331, in __init__ self._refresh_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3348, in _refresh_data AMR3DData._refresh_data(self) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 307, in _refresh_data self.get_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3355, in get_data self._get_list_of_grids() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3343, in _get_list_of_grids self.right_edge + buffer, self.level) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/object_finding_mixin.py", line 214, in get_box_grids_below_level self.grid_levels, mask) File "misc_utilities.pyx", line 91, in yt.utilities.amr_utils.get_box_grids_below_level (yt/utilities/amr_utils.c:58776) ValueError: Buffer dtype mismatch, expected 'int32_t' but got 'long'
It is possible to partially get around this by declaring all the input ints (e.g. dims=[128, 128, 128]) to covering_grid as type int32. However, doing this for all yt calls seems tedious. Is there an easier way of dealing with this issue?
Thanks! Stella
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Matt, Just to be clear, the left_edge arguments need to be int32s? I'm confused because the example had floats for the left and right edge values... By the way, the undergrad just left so it will take a little time to verify in any case. Best, Kaitlin On Mar 19, 2012, at 1:41 PM, Matthew Turk wrote:
Hi Stella,
Thanks for the bug report -- in looking over the arguments to covering_grid, the only one that is not manually cast (already) is left_edge, which is the second argument (i.e., level, left_edge, dims, ...). Can you tell me if just casting *that* one to int32 fixes it? If so, I'll commit/push that change.
Best,
Matt
On Mon, Mar 19, 2012 at 12:02 PM, Stella Offner <soffner@cfa.harvard.edu> wrote:
Hi,
I'm encountering an int/long error in a new installation of yt, python, computer cluster etc:
(yt-x86_64)[pjumper@hpcmanage ~]$ python covering_grid_test.py yt : [WARNING ] 2012-03-19 18:42:59,135 Setting 1.0 in code units to be 1.0 cm yt : [WARNING ] 2012-03-19 18:42:59,135 No time units. Setting 1.0 = 1 second. yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: current_time = 2.26390632737e+14 yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_dimensions = [256, 256, 256] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_left_edge = [ -3.09000000e+18 -3.09000000e+18 -3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_right_edge = [ 3.09000000e+18 3.09000000e+18 3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field density to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field xmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field ymom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field zmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field eden to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field frac1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhof1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhofe1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phi to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phicorr to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test0 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test2 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field log_den to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field pressure to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field xvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field yvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field zvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field ieng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field keng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field cvt to list of fields yt : [INFO ] 2012-03-19 18:42:59,296 Setting right_edge to [1.0, 1.0, 1.0] Traceback (most recent call last): File "covering_grid_test.py", line 20, in <module> dims=[128,128,128], File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3331, in __init__ self._refresh_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3348, in _refresh_data AMR3DData._refresh_data(self) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 307, in _refresh_data self.get_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3355, in get_data self._get_list_of_grids() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3343, in _get_list_of_grids self.right_edge + buffer, self.level) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/object_finding_mixin.py", line 214, in get_box_grids_below_level self.grid_levels, mask) File "misc_utilities.pyx", line 91, in yt.utilities.amr_utils.get_box_grids_below_level (yt/utilities/amr_utils.c:58776) ValueError: Buffer dtype mismatch, expected 'int32_t' but got 'long'
It is possible to partially get around this by declaring all the input ints (e.g. dims=[128, 128, 128]) to covering_grid as type int32. However, doing this for all yt calls seems tedious. Is there an easier way of dealing with this issue?
Thanks! Stella
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Kaitlin, Looking over the docs, yes -- that example is incorrect and I have just updated it ( https://bitbucket.org/yt_analysis/cookbook/changeset/ec107f1da0b0 ). The covering grid is based on integer indices, and you specify the (relative-to-level) integer starting index and the extent in indices in that level. Thanks for pointing that out ... -Matt On Mon, Mar 19, 2012 at 1:47 PM, Kaitlin Kratter <kaitlin.kratter@gmail.com> wrote:
Hi Matt,
Just to be clear, the left_edge arguments need to be int32s? I'm confused because the example had floats for the left and right edge values...
By the way, the undergrad just left so it will take a little time to verify in any case.
Best, Kaitlin
On Mar 19, 2012, at 1:41 PM, Matthew Turk wrote:
Hi Stella,
Thanks for the bug report -- in looking over the arguments to covering_grid, the only one that is not manually cast (already) is left_edge, which is the second argument (i.e., level, left_edge, dims, ...). Can you tell me if just casting *that* one to int32 fixes it? If so, I'll commit/push that change.
Best,
Matt
On Mon, Mar 19, 2012 at 12:02 PM, Stella Offner <soffner@cfa.harvard.edu> wrote:
Hi,
I'm encountering an int/long error in a new installation of yt, python, computer cluster etc:
(yt-x86_64)[pjumper@hpcmanage ~]$ python covering_grid_test.py yt : [WARNING ] 2012-03-19 18:42:59,135 Setting 1.0 in code units to be 1.0 cm yt : [WARNING ] 2012-03-19 18:42:59,135 No time units. Setting 1.0 = 1 second. yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: current_time = 2.26390632737e+14 yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_dimensions = [256, 256, 256] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_left_edge = [ -3.09000000e+18 -3.09000000e+18 -3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,136 Parameters: domain_right_edge = [ 3.09000000e+18 3.09000000e+18 3.09000000e+18] yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field density to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field xmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field ymom to list of fields yt : [INFO ] 2012-03-19 18:42:59,228 Adding unknown field zmom to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field eden to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field frac1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhof1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field rhofe1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phi to list of fields yt : [INFO ] 2012-03-19 18:42:59,229 Adding unknown field phicorr to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test0 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test1 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field test2 to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field log_den to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field pressure to list of fields yt : [INFO ] 2012-03-19 18:42:59,230 Adding unknown field xvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field yvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field zvel to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field ieng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field keng to list of fields yt : [INFO ] 2012-03-19 18:42:59,231 Adding unknown field cvt to list of fields yt : [INFO ] 2012-03-19 18:42:59,296 Setting right_edge to [1.0, 1.0, 1.0] Traceback (most recent call last): File "covering_grid_test.py", line 20, in <module> dims=[128,128,128], File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3331, in __init__ self._refresh_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3348, in _refresh_data AMR3DData._refresh_data(self) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 307, in _refresh_data self.get_data() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3355, in get_data self._get_list_of_grids() File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3343, in _get_list_of_grids self.right_edge + buffer, self.level) File "/usr/local/yt/yt-x86_64/src/yt-hg/yt/data_objects/object_finding_mixin.py", line 214, in get_box_grids_below_level self.grid_levels, mask) File "misc_utilities.pyx", line 91, in yt.utilities.amr_utils.get_box_grids_below_level (yt/utilities/amr_utils.c:58776) ValueError: Buffer dtype mismatch, expected 'int32_t' but got 'long'
It is possible to partially get around this by declaring all the input ints (e.g. dims=[128, 128, 128]) to covering_grid as type int32. However, doing this for all yt calls seems tedious. Is there an easier way of dealing with this issue?
Thanks! Stella
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Matt, Thanks for your quick response. I had checked the example with my slightly older version of yt, and it worked fine, so I assume this is just the result of a new change in yt. We'll let you know if for some reason this doesn't fix the problem. Thanks, Stella Matthew Turk wrote:
Hi Kaitlin,
Looking over the docs, yes -- that example is incorrect and I have just updated it ( https://bitbucket.org/yt_analysis/cookbook/changeset/ec107f1da0b0 ). The covering grid is based on integer indices, and you specify the (relative-to-level) integer starting index and the extent in indices in that level. Thanks for pointing that out ...
-Matt
On Mon, Mar 19, 2012 at 1:47 PM, Kaitlin Kratter <kaitlin.kratter@gmail.com> wrote:
Hi Matt,
Just to be clear, the left_edge arguments need to be int32s? I'm confused because the example had floats for the left and right edge values...
By the way, the undergrad just left so it will take a little time to verify in any case.
Best, Kaitlin
Stella and Kaitlin, I take this back. I was wrong, left_edge for a covering grid does not and should not be an integer -- my apologies for the confusion. To get aorund the issue you were seeing, I've added a cast for the "levels" attribute, which I believe is the correct one to cast to int32. Again, sorry for the confusion. This showed up in regression testing a few hours ago, and I just saw the problem get flagged. -Matt On Mon, Mar 19, 2012 at 2:00 PM, Stella Offner <soffner@cfa.harvard.edu> wrote:
Hi Matt,
Thanks for your quick response. I had checked the example with my slightly older version of yt, and it worked fine, so I assume this is just the result of a new change in yt. We'll let you know if for some reason this doesn't fix the problem.
Thanks, Stella
Matthew Turk wrote:
Hi Kaitlin,
Looking over the docs, yes -- that example is incorrect and I have just updated it ( https://bitbucket.org/yt_analysis/cookbook/changeset/ec107f1da0b0 ). The covering grid is based on integer indices, and you specify the (relative-to-level) integer starting index and the extent in indices in that level. Thanks for pointing that out ...
-Matt
On Mon, Mar 19, 2012 at 1:47 PM, Kaitlin Kratter <kaitlin.kratter@gmail.com> wrote:
Hi Matt,
Just to be clear, the left_edge arguments need to be int32s? I'm confused because the example had floats for the left and right edge values...
By the way, the undergrad just left so it will take a little time to verify in any case.
Best, Kaitlin
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Kaitlin Kratter
-
Matthew Turk
-
Stella Offner