Skip to content

Quiver barb size not correct on some arches (ppc64, ppc64le...) #7797

Closed

Description

@AdamWill

Continuing to work through test suite failures found when building on the Fedora ppc64 arch (big-endian) but not on little-endian arches. Two failures:

matplotlib.tests.test_quiver.test_barbs.test
matplotlib.tests.test_transforms.test_pre_transform_plotting.test

seem to be caused by differences in the lengths of 'barbs' on 'quivers' - the former is a test specific to such barbs, the latter includes a figure with some barbs as part of a larger test. In both cases, the lengths of the barbs come out subtly differently on ppc64:

barbs_test_image GOT: barbs_test_image
barbs_test_image EXPECTED: barbs_test_image-expected
pre_transform_data GOT: pre_transform_data
pre_transform_data EXPECTED: pre_transform_data-expected

the difference is quite subtle, it helps to A/B the images quickly in an image viewer. AFAICS, in all cases where the lengths are visibly different, the barbs actually produced are slightly shorter than expected.

Activity

  1. AdamWill commented on Jan 11, 2017

    @AdamWill
    ContributorAuthor
  2. AdamWill commented on Jan 11, 2017

    @AdamWill
    ContributorAuthor

    This may be #4385 ?

  3. changed the title [-]Quiver barb size not correct on ppc64 (big-endian)[/-] [+]Quiver barb size not correct on some arches (ppc64, ppc64le...)[/+] on Jan 11, 2017
  4. AdamWill commented on Jan 11, 2017

    @AdamWill
    ContributorAuthor

    This also affects ppc64le, so it's not a big-endian thing. It may also affect aarch64.

  5. dopplershift commented on Jan 11, 2017

    @dopplershift
    Contributor

    I don't think #4385--that's a different rounding problem, IMO. It looks like some kind of pixel snapping issue to me.

    I don't have a clue how to begin to figure out what's going on here without access to a machine...

  6. AdamWill commented on Jan 11, 2017

    @AdamWill
    ContributorAuthor

    @puiterwijk ahoy! would you be willing to let an upstream matplotlib person have access to one of our sandbox ppc64 or aarch64 environments to try and look into this kinda thing?

  7. puiterwijk commented on Jan 12, 2017

    @puiterwijk

    @AdamWill You can add their key to your test instance, and let them use that?

  8. AdamWill commented on Jan 12, 2017

    @AdamWill
    ContributorAuthor

    I thought you'd already torn it down :) If you don't mind leaving it up a while longer, sure. @dopplershift , can you send me your ssh pubkey?

  9. dopplershift commented on Jan 18, 2017

    @dopplershift
    Contributor

    Sorry, I've been swamped with conference prep. It will probably be no earlier than the 21st/22nd that I might be able to get to this. Not sure if that time frame works for you guys.

  10. AdamWill commented on Jan 18, 2017

    @AdamWill
    ContributorAuthor

    I don't think it should be a problem, we should still be able to put up an instance for you at that time, I think.

  11. puiterwijk commented on Jan 19, 2017

    @puiterwijk

    @AdamWill I'll keep your current instance around. Just let me know when I can clear it after they're done with it.

  12. dopplershift commented on Jan 31, 2017

    @dopplershift
    Contributor

    @AdamWill Ok, I've got cycles now. Here's the public key:

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxtEykVuf26l7WVrYnvzVWmKdM2a4IBtH0O6wRqPBbG6+/ABmx+YZ+gF63Ry0ylZ9AXhJslUFxkSnuk8X1HjlXc19fyoJTWnAWVF2kNyJj+fUC095dExI5DBCVqtA/34tKBX/FXHr90Nbb7eiUK0v3pjwo1H34ATq0ggeTur/Gj3pEhk5fg+EtsESv2WFIbofQUWN7d7nHxLTNwF45JNacl8BK2McnclVhg+qVHf91vK+x7vqHRi/biHm2NT9fojlOvfC6q/wmCKzZkQ6H2uI9A6RzrlKWpx0HibgRkNHh0bBKvSRpKHKVHBcZLz/J+YHMZ4Sb5Pf7hKXsqRfMb8uX rmay
    
  13. AdamWill commented on Aug 23, 2017

    @AdamWill
    ContributorAuthor

    sorry, I kinda lost track of these remaining issues; did I ever set you up with the appropriate access, @dopplershift ? If not, should we try another round?

  14. dopplershift commented on Aug 23, 2017

    @dopplershift
    Contributor

    Not that I'm aware of. I have a few cycles I can use to look at this.

  15. AdamWill commented on Aug 23, 2017

    @AdamWill
    ContributorAuthor

    same pubkey?

  16. 7 remaining items

  17. tacaswell commented on Sep 1, 2017

    @tacaswell
    Member

    Did you look at the verts before or after running through all of the path simplification code?

  18. dopplershift commented on Sep 1, 2017

    @dopplershift
    Contributor

    Before. I may not know enough about the path simplification code, but the differences we're seeing aren't coming from dropping a vertex.

  19. tacaswell commented on Sep 1, 2017

    @tacaswell
    Member

    miss interpretting LE/BE tends to have catastrophic effects, I'm quite puzzled by this. There are some issues with float128 on ppc64 (see https://github.com/h5py/h5py/pull/842/files) I wonder if this is related (I hope not!)?

    attn @sandrotosi do you see these with debian too?

  20. AdamWill commented on Sep 2, 2017

    @AdamWill
    ContributorAuthor

    Note this is definitely not an LE / BE thing, per the comment on January 10. It also affects ppc64le.

  21. tacaswell commented on Sep 2, 2017

    @tacaswell
    Member

    Sorry, did not read carefully enough 🐑

  22. modified the milestones: , on Oct 9, 2017
  23. QuLogic commented on Oct 15, 2017

    @QuLogic
    Member

    After a few days of trial and error, I think I've found the problem. It seems to originate in the Agg cross_product function. You can see the difference in this gist where I ran a few sample inputs from the broken test. The inputs are bit-for-bit identical between x86 and ppc at the start of cross_product, but only the first test case outputs the same result. The second and third tests are slightly less and slightly greater than the expected 0.

    Interestingly, this difference only happens with both -O2 and -fPIC (which are both part of Fedora flags). I wonder if that qualifies as a gcc bug?

    The slightly negative result is okay, but the slightly positive result triggers the wrong side of this check, meaning the stroking uses an inner join instead of an outer join, resulting in a couple fewer vertices. If this condition is changed to use some epsilon check, then ppc should work (though I'd need to see whether it breaks anything else.)

  24. dopplershift commented on Oct 17, 2017

    @dopplershift
    Contributor

    Interesting--thanks for running this down @QuLogic !

    I've seen this problem in other projects-->0 checks need to be checked against epsilon, just like everything else floating point.

  25. QuLogic commented on Oct 17, 2017

    @QuLogic
    Member

    For now, I'm not sure if we should import the changes here, as it causes a few test failures on x86_64. I've opened this bug report to see if there's anything up with gcc itself as the trigger is a bit odd to me.

  26. QuLogic commented on Dec 22, 2017

    @QuLogic
    Member

    gcc devs say this is an expected optimization (FMA), so I'm going to open a PR with the patch here.

  27. AdamWill commented on Dec 22, 2017

    @AdamWill
    ContributorAuthor

    Thanks a lot for figuring this out, folks!

  28. modified the milestones: , v2.1.2 on Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions