Repository navigation
BUG: Unusual test failures (whitespace-related?) on ppc32 with numpy-1.25.1 #24239
Copy link
Copy link
Closed
Closed
Copy link
Labels
Milestone
Description
Describe the issue:
I get several more test failures with numpy-1.25.1 than I do with numpy-1.24.4 on ppc32:
- numpy-1.24.4: 15 failed, 25832 passed, 883 skipped, 31 xfailed, 7 xpassed, 387 warnings
- numpy-1.25.1: 71 failed, 34200 passed, 931 skipped, 31 xfailed, 6 xpassed, 709 warnings
It's worth noting that we've switched prematurely to building with Meson in Gentoo for 1.25.x, although I hope that's not relevant for this bug.
What's especially interesting is that a bunch of the failures seem to be whitespace related in TestArray2String.
There are some other errors in the log as well which look endianness related. Some of these aren't new to us (see https://bugs.gentoo.org/707116, #11831, #12638).
Reproduce the code example:
I've only reproduced this via the numpy test suite.Error message:
I get the following test failures with numpy-1.25.1:
FAILED core/tests/test_defchararray.py::TestOperations::test_mod - AssertionError:
FAILED core/tests/test_api.py::test_array_array - AssertionError:
FAILED core/tests/test_arrayprint.py::TestArrayRepr::test_subclass - AssertionError:
FAILED core/tests/test_arrayprint.py::TestArrayRepr::test_0d_object_subclass - AssertionError:
FAILED core/tests/test_arrayprint.py::TestArray2String::test_basic - AssertionError
FAILED core/tests/test_arrayprint.py::TestArray2String::test_structure_format_int - AssertionError:
FAILED core/tests/test_arrayprint.py::TestArray2String::test_edgeitems_kwarg - AssertionError:
FAILED core/tests/test_arrayprint.py::TestArray2String::test_summarize_2d - AssertionError:
FAILED core/tests/test_arrayprint.py::TestArray2String::test_linewidth - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_precision_zero - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_formatter - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_formatter_reset - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_0d_arrays - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_legacy_stray_comma - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_dtype_linewidth_wrapping - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_linewidth_repr - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_linewidth_str - AssertionError:
FAILED core/tests/test_arrayprint.py::TestPrintOptions::test_edgeitems - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[B-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[H-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[H-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[I-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[I-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[L-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[L-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[Q-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[Q-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[P-S] - AssertionError:
FAILED core/tests/test_overrides.py::TestNDArrayMethods::test_repr - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[P-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[e-S] - AssertionError:
FAILED core/tests/test_records.py::TestFromrecords::test_recarray_repr - AssertionError:
FAILED core/tests/test_records.py::TestFromrecords::test_0d_recarray_repr - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[e-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[f-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[f-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[d-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[d-U] - AssertionError:
FAILED core/tests/test_shape_base.py::TestConcatenate::test_concatenate_axis_None - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[g-S] - AssertionError:
FAILED core/tests/test_numeric.py::TestCreationFuncs::test_full - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[g-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[F-S] - AssertionError:
FAILED core/tests/test_numeric.py::TestStringFunction::test_set_string_function - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[F-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[D-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[D-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[G-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[G-U] - AssertionError:
FAILED ma/tests/test_core.py::TestMaskedArray::test_basic0d - AssertionError:
FAILED ma/tests/test_core.py::TestMaskedArray::test_str_repr - AssertionError:
FAILED ma/tests/test_core.py::TestMaskedArray::test_str_repr_legacy - AssertionError:
FAILED matrixlib/tests/test_defmatrix.py::TestProperties::test_repr - AssertionError
FAILED matrixlib/tests/test_interaction.py::test_array_equal_error_message_matrix - AssertionError:
FAILED polynomial/tests/test_printing.py::TestRepr::test_polynomial_str - AssertionError:
FAILED polynomial/tests/test_printing.py::TestRepr::test_chebyshev_str - AssertionError:
FAILED polynomial/tests/test_printing.py::TestRepr::test_legendre_repr - AssertionError:
FAILED polynomial/tests/test_printing.py::TestRepr::test_hermite_repr - AssertionError:
FAILED polynomial/tests/test_printing.py::TestRepr::test_hermiteE_repr - AssertionError:
FAILED testing/tests/test_utils.py::TestAlmostEqual::test_error_message - AssertionError:
FAILED f2py/tests/test_kind.py::TestKind::test_int - AssertionError: selectedintkind(19): expected 16 but got -1
FAILED core/tests/test_multiarray.py::TestDtypedescr::test_structured_non_void - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[b-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[h-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[i-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[i-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[l-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[q-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[p-S] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[p-U] - AssertionError:
FAILED core/tests/test_nditer.py::test_iter_copy_casts[B-S] - AssertionError:
======================================================== 71 failed, 34200 passed, 931 skipped, 31 xfailed, 6 xpassed, 709 warnings in 470.58s (0:07:50) ========================================================
* ERROR: dev-python/numpy-1.25.1-r1::gentoo failed (test phase):
* pytest failed with python3.11Full log (xz-compressed): https://bugs.gentoo.org/attachment.cgi?id=866019.
### Runtime information:
1.25.1
3.11.4 (main, Jul 5 2023, 00:34:18) [GCC 13.1.1 20230527]
### Context for the issue:
- Downstream Gentoo bug: https://bugs.gentoo.org/910739
- This affects us deploying newer versions of Numpy. Dropping Numpy on an architecture means dropping a very large number of packages, as it's often needed as a direct dependency if not as a test dependency.
Reactions are currently unavailable
Activity
seberg commentedon Jul 23, 2023
Using meson does very much not seem advisable at all, assuming it works, you still should get a slower than wanted build.
The main failure I see seem to me thing like:
Can you check if the first and/or second fail?
I suppose it would have to be related with the PPC32 platform somehow, but not sure where to look.
thesamesam commentedon Jul 23, 2023
wrt meson: yeah, that's fine, we've already filed a bunch of bugs for things. Having Meson makes life a lot easier for us because of the hacks needed for distutils to get cross working. We've already discussed it w/ Ralf (not saying he loves it, but he's aware).
b'3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
b'1\x00\x00\x00\x001\x00\x00\x00\x001\x00\x00\x00\x001\x00\x00\x00\x001\x00\x00\x00\x00'
seberg commentedon Jul 23, 2023
Hummm, well, the second is nonense, its filling in 1 not 3. Although it should end up doing much the same code path internally, unless string to string copies are broken 🤔.
But first let's see, does this part work? (i.e. the first step, converting the NumPy 3 to the right string). That seems more likely to be wrong then:
thesamesam commentedon Jul 23, 2023
Huh!
seberg commentedon Jul 23, 2023
OK. that was helpful, thanks.
@mattip another oversight in gh-23746 from everyone glancing at the code, although I am very surprised that this could fly under the radar long enough?!
I suppose it hits seriously only on a big-endian machine that also has a "weird" size for C
long...@thesamesam if you want to look at that, the casts in that PR are clearly wrong mixing bit-sized names with C names.
thesamesam commentedon Jul 23, 2023
Many thanks for your help! Let me give that a whack.
BUG: Fix C types in scalartypes
BUG: Fix C types in scalartypes
seberg commentedon Jul 24, 2023
@thesamesam could you also post the last remaining (clear) error you are seeing, or maybe just create a new issue?
BUG: Fix C types in scalartypes
BUG: Fix C types in scalartypes