Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests fail on less common architectures #2328

Closed
drew-parsons opened this issue Mar 17, 2021 · 9 comments · Fixed by #2593, #2762 or #2763
Closed

tests fail on less common architectures #2328

drew-parsons opened this issue Mar 17, 2021 · 9 comments · Fixed by #2593, #2762 or #2763

Comments

@drew-parsons
Copy link
Contributor

drew-parsons commented Mar 17, 2021

xtensor tests fail on less common machine architectures, including i386, mipsel, s390x, and others. Build logs can be found at https://buildd.debian.org/status/package.php?p=xtensor&suite=experimental

There seem to be two separate sets of failures. test_xnpy fails on s390x, hppa, powerpc, ppc64, sparc64.

On i386 the failing tests are test_xbuilder, test_xfunction, test_xreducer, test_xnan_functions.

The xnpy error message on s390x is

[----------] 3 tests from xnpy
[ RUN      ] xnpy.load
unknown file: Failure
C++ exception with description "Cast error: formats not matching <f8 vs >f8" thrown in the test body.
[  FAILED  ] xnpy.load (3 ms)
[ RUN      ] xnpy.dump
./test/test_xnpy.cpp:146: Failure
Value of: compare_binary_files(filename, compare_name)
  Actual: false
Expected: true
./test/test_xnpy.cpp:150: Failure
Expected equality of these values:
  ularr_str
    Which is: "\x93NUMPY\x1\0v\0{'descr': '>u8', 'fortran_order': False, 'shape': (5,), }                                                            \n\0\0\0\0\0\0\0\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\x12\xD5\x91"
  ularr_disk
    Which is: "\x93NUMPY\x1\0v\0{'descr': '<u8', 'fortran_order': False, 'shape': (5,), }                                                            \n\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\0\0\x91\xD5\x12\0\0\0\0\0"
With diff:
@@ -1,2 +1,2 @@
-\x93NUMPY\x1\0v\0{'descr': '>u8', 'fortran_order': False, 'shape': (5,), }                                                            
-\0\0\0\0\0\0\0\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\x12\xD5\x91
+\x93NUMPY\x1\0v\0{'descr': '<u8', 'fortran_order': False, 'shape': (5,), }                                                            
+\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\0\0\x91\xD5\x12\0\0\0\0\0

Dumping boolean numpy file to string failed
[  FAILED  ] xnpy.dump (1 ms)
[ RUN      ] xnpy.xfunction_cast
unknown file: Failure
C++ exception with description "Cast error: formats not matching <f8 vs >f8" thrown in the test body.
[  FAILED  ] xnpy.xfunction_cast (0 ms)
[----------] 3 tests from xnpy (4 ms total)

The error messages on i386 are

[ RUN      ] xbuilder.linspace_double
./test/test_xbuilder.cpp:691: Failure
Expected equality of these values:
  a
    Which is: { 0, 2.04082, 4.08163, 6.12245, 8.16327, 10.2041, 12.2449, 14.2857, 16.3265, 18.3673, 20.4082, 22.449, 24.4898, 26.5306, 28.5714, 30.6122, 32.6531, 34.6939, 36.7347, 38.7755, 40.8163, 42.8571, 44.898, 46.9388, 48.9796, 51.0204, 53.0612, 55.102, 57.1429, 59.1837, 61.2245, 63.2653, ... }
  b
    Which is: { 0, 2.04082, 4.08163, 6.12245, 8.16327, 10.2041, 12.2449, 14.2857, 16.3265, 18.3673, 20.4082, 22.449, 24.4898, 26.5306, 28.5714, 30.6122, 32.6531, 34.6939, 36.7347, 38.7755, 40.8163, 42.8571, 44.898, 46.9388, 48.9796, 51.0204, 53.0612, 55.102, 57.1429, 59.1837, 61.2245, 63.2653, ... }
[  FAILED  ] xbuilder.linspace_double (0 ms)
[----------] 31 tests from xbuilder (1 ms total)

[----------] Global test environment tear-down
[==========] 31 tests from 1 test suite ran. (1 ms total)
[  PASSED  ] 30 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] xbuilder.linspace_double
[ RUN      ] xreducer.average
./test/test_xreducer.cpp:604: Failure
Value of: all(equal(avg1, expect1))
  Actual: false
Expected: true
./test/test_xreducer.cpp:605: Failure
Value of: all(equal(avg_m1, expect1))
  Actual: false
Expected: true
./test/test_xreducer.cpp:606: Failure
Value of: all(equal(avg_d1, expect1))
  Actual: false
Expected: true
[  FAILED  ] xreducer.average (10 ms)
[ RUN      ] xfunction.all_iterators
./test/test_xfunction.cpp:437: Failure
Expected equality of these values:
  res2
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
  res5
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
./test/test_xfunction.cpp:438: Failure
Expected equality of these values:
  res4
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
  res5
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
./test/test_xfunction.cpp:441: Failure
Expected equality of these values:
  res1
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
  res5
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
./test/test_xfunction.cpp:442: Failure
Expected equality of these values:
  res3
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
  res5
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
./test/test_xfunction.cpp:443: Failure
Expected equality of these values:
  func
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
  res5
    Which is: { 0.036708, 1.39448, 1.87741, 0.0977121, 0.189934, 0.598901, 0.0709755, 1.97163, 1.98587, 1.87287, 1.05368, 1.92515, 0.0241392, 1.27395, 0.176453, 4.57634e-05, 0.0252965, 0.818594, 1.54328, 0.507352, 1.27338, 0.261067, 0.0898238, 0.928502, 0.317985, 1.09712, 0.450792, 0.356316, 0.0604582, 0.182303, 1.27131, 0.200408, ... }
./test/test_xfunction.cpp:441: Failure
Expected equality of these values:
  res1
    Which is: { 0.276178, 0.867324, 2.48769, 0.0298791, 0.610281, 1.11554, 0.195672, 2.54935, 0.1347, 1.91638, 1.47967, 1.01908, 0.282084, 0.107887, 0.588225, 0.00975142, 0.116817, 1.64267, 0.118745, 0.997433, 1.62662, 0.375276, 0.544142, 0.0921053, 0.789645, 1.50985, 0.493132, 1.08376, 0.0235029, 0.597896, 1.6253, 0.328801, ... }
  res5
    Which is: { 0.276178, 0.867324, 2.48769, 0.0298791, 0.610281, 1.11554, 0.195672, 2.54935, 0.1347, 1.91638, 1.47967, 1.01908, 0.282084, 0.107887, 0.588225, 0.00975142, 0.116817, 1.64267, 0.118745, 0.997433, 1.62662, 0.375276, 0.544142, 0.0921053, 0.789645, 1.50985, 0.493132, 1.08376, 0.0235029, 0.597896, 1.6253, 0.328801, ... }
./test/test_xfunction.cpp:442: Failure
Expected equality of these values:
  res3
    Which is: { 0.276178, 0.867324, 2.48769, 0.0298791, 0.610281, 1.11554, 0.195672, 2.54935, 0.1347, 1.91638, 1.47967, 1.01908, 0.282084, 0.107887, 0.588225, 0.00975142, 0.116817, 1.64267, 0.118745, 0.997433, 1.62662, 0.375276, 0.544142, 0.0921053, 0.789645, 1.50985, 0.493132, 1.08376, 0.0235029, 0.597896, 1.6253, 0.328801, ... }
  res5
    Which is: { 0.276178, 0.867324, 2.48769, 0.0298791, 0.610281, 1.11554, 0.195672, 2.54935, 0.1347, 1.91638, 1.47967, 1.01908, 0.282084, 0.107887, 0.588225, 0.00975142, 0.116817, 1.64267, 0.118745, 0.997433, 1.62662, 0.375276, 0.544142, 0.0921053, 0.789645, 1.50985, 0.493132, 1.08376, 0.0235029, 0.597896, 1.6253, 0.328801, ... }
./test/test_xfunction.cpp:443: Failure
Expected equality of these values:
  func
    Which is: { 0.276178, 0.867324, 2.48769, 0.0298791, 0.610281, 1.11554, 0.195672, 2.54935, 0.1347, 1.91638, 1.47967, 1.01908, 0.282084, 0.107887, 0.588225, 0.00975142, 0.116817, 1.64267, 0.118745, 0.997433, 1.62662, 0.375276, 0.544142, 0.0921053, 0.789645, 1.50985, 0.493132, 1.08376, 0.0235029, 0.597896, 1.6253, 0.328801, ... }
  res5
    Which is: { 0.276178, 0.867324, 2.48769, 0.0298791, 0.610281, 1.11554, 0.195672, 2.54935, 0.1347, 1.91638, 1.47967, 1.01908, 0.282084, 0.107887, 0.588225, 0.00975142, 0.116817, 1.64267, 0.118745, 0.997433, 1.62662, 0.375276, 0.544142, 0.0921053, 0.789645, 1.50985, 0.493132, 1.08376, 0.0235029, 0.597896, 1.6253, 0.328801, ... }
./test/test_xfunction.cpp:441: Failure
Expected equality of these values:
  res1
    Which is: { 5.27618, 5.86732, 7.48769, 5.02988, 5.61028, 6.11554, 5.19567, 7.54935, 5.1347, 6.91638, 6.47967, 6.01908, 5.28208, 5.10789, 5.58822, 5.00975, 5.11682, 6.64267, 5.11875, 5.99743, 6.62662, 5.37528, 5.54414, 5.09211, 5.78965, 6.50985, 5.49313, 6.08376, 5.0235, 5.5979, 6.6253, 5.3288, ... }
  res5
    Which is: { 5.27618, 5.86732, 7.48769, 5.02988, 5.61028, 6.11554, 5.19567, 7.54935, 5.1347, 6.91638, 6.47967, 6.01908, 5.28208, 5.10789, 5.58822, 5.00975, 5.11682, 6.64267, 5.11875, 5.99743, 6.62662, 5.37528, 5.54414, 5.09211, 5.78965, 6.50985, 5.49313, 6.08376, 5.0235, 5.5979, 6.6253, 5.3288, ... }
./test/test_xfunction.cpp:442: Failure
Expected equality of these values:
  res3
    Which is: { 5.27618, 5.86732, 7.48769, 5.02988, 5.61028, 6.11554, 5.19567, 7.54935, 5.1347, 6.91638, 6.47967, 6.01908, 5.28208, 5.10789, 5.58822, 5.00975, 5.11682, 6.64267, 5.11875, 5.99743, 6.62662, 5.37528, 5.54414, 5.09211, 5.78965, 6.50985, 5.49313, 6.08376, 5.0235, 5.5979, 6.6253, 5.3288, ... }
  res5
    Which is: { 5.27618, 5.86732, 7.48769, 5.02988, 5.61028, 6.11554, 5.19567, 7.54935, 5.1347, 6.91638, 6.47967, 6.01908, 5.28208, 5.10789, 5.58822, 5.00975, 5.11682, 6.64267, 5.11875, 5.99743, 6.62662, 5.37528, 5.54414, 5.09211, 5.78965, 6.50985, 5.49313, 6.08376, 5.0235, 5.5979, 6.6253, 5.3288, ... }
./test/test_xfunction.cpp:443: Failure
Expected equality of these values:
  func
    Which is: { 5.27618, 5.86732, 7.48769, 5.02988, 5.61028, 6.11554, 5.19567, 7.54935, 5.1347, 6.91638, 6.47967, 6.01908, 5.28208, 5.10789, 5.58822, 5.00975, 5.11682, 6.64267, 5.11875, 5.99743, 6.62662, 5.37528, 5.54414, 5.09211, 5.78965, 6.50985, 5.49313, 6.08376, 5.0235, 5.5979, 6.6253, 5.3288, ... }
  res5
    Which is: { 5.27618, 5.86732, 7.48769, 5.02988, 5.61028, 6.11554, 5.19567, 7.54935, 5.1347, 6.91638, 6.47967, 6.01908, 5.28208, 5.10789, 5.58822, 5.00975, 5.11682, 6.64267, 5.11875, 5.99743, 6.62662, 5.37528, 5.54414, 5.09211, 5.78965, 6.50985, 5.49313, 6.08376, 5.0235, 5.5979, 6.6253, 5.3288, ... }
./test/test_xfunction.cpp:441: Failure
Expected equality of these values:
  res1
    Which is: { 0.069039, 0.0384502, 0.814603, 0.000949708, 0.0575034, 0.298263, 0.00505859, 0.53314, 0.000363417, 0.434563, 0.263347, 0.149012, 0.0187634, 0.00496284, 0.0749659, 0.00247823, 0.0015759, 0.138508, 0.0199797, 0.273498, 0.532298, 0.103008, 0.0547457, 0.00147197, 0.0652372, 0.377434, 0.0218615, 0.354882, 0.00074704, 0.0563364, 0.434558, 0.00850028, ... }
  res5
    Which is: { 0.069039, 0.0384502, 0.814603, 0.000949708, 0.0575034, 0.298263, 0.00505859, 0.53314, 0.000363417, 0.434563, 0.263347, 0.149012, 0.0187634, 0.00496284, 0.0749659, 0.00247823, 0.0015759, 0.138508, 0.0199797, 0.273498, 0.532298, 0.103008, 0.0547457, 0.00147197, 0.0652372, 0.377434, 0.0218615, 0.354882, 0.00074704, 0.0563364, 0.434558, 0.00850028, ... }
./test/test_xfunction.cpp:442: Failure
Expected equality of these values:
  res3
    Which is: { 0.069039, 0.0384502, 0.814603, 0.000949708, 0.0575034, 0.298263, 0.00505859, 0.53314, 0.000363417, 0.434563, 0.263347, 0.149012, 0.0187634, 0.00496284, 0.0749659, 0.00247823, 0.0015759, 0.138508, 0.0199797, 0.273498, 0.532298, 0.103008, 0.0547457, 0.00147197, 0.0652372, 0.377434, 0.0218615, 0.354882, 0.00074704, 0.0563364, 0.434558, 0.00850028, ... }
  res5
    Which is: { 0.069039, 0.0384502, 0.814603, 0.000949708, 0.0575034, 0.298263, 0.00505859, 0.53314, 0.000363417, 0.434563, 0.263347, 0.149012, 0.0187634, 0.00496284, 0.0749659, 0.00247823, 0.0015759, 0.138508, 0.0199797, 0.273498, 0.532298, 0.103008, 0.0547457, 0.00147197, 0.0652372, 0.377434, 0.0218615, 0.354882, 0.00074704, 0.0563364, 0.434558, 0.00850028, ... }
./test/test_xfunction.cpp:443: Failure
Expected equality of these values:
  func
    Which is: { 0.069039, 0.0384502, 0.814603, 0.000949708, 0.0575034, 0.298263, 0.00505859, 0.53314, 0.000363417, 0.434563, 0.263347, 0.149012, 0.0187634, 0.00496284, 0.0749659, 0.00247823, 0.0015759, 0.138508, 0.0199797, 0.273498, 0.532298, 0.103008, 0.0547457, 0.00147197, 0.0652372, 0.377434, 0.0218615, 0.354882, 0.00074704, 0.0563364, 0.434558, 0.00850028, ... }
  res5
    Which is: { 0.069039, 0.0384502, 0.814603, 0.000949708, 0.0575034, 0.298263, 0.00505859, 0.53314, 0.000363417, 0.434563, 0.263347, 0.149012, 0.0187634, 0.00496284, 0.0749659, 0.00247823, 0.0015759, 0.138508, 0.0199797, 0.273498, 0.532298, 0.103008, 0.0547457, 0.00147197, 0.0652372, 0.377434, 0.0218615, 0.354882, 0.00074704, 0.0563364, 0.434558, 0.00850028, ... }
./test/test_xfunction.cpp:441: Failure
Expected equality of these values:
  res1
    Which is: { 0.26585, 18.1336, 1.15235, 51.4432, 1.6515, 1.00398, 7.01535, 1.84907, 2732.22, 2.15488, 2.00056, 6.45972, 0.643253, 128.348, 1.17689, 0.00923309, 8.02604, 2.95504, 38.6212, 0.927526, 1.19612, 1.26722, 0.820374, 315.393, 2.43714, 1.45339, 10.3102, 0.50202, 40.4652, 1.61799, 1.46276, 11.7883, ... }
  res5
    Which is: { 0.26585, 18.1336, 1.15235, 51.4432, 1.6515, 1.00398, 7.01535, 1.84907, 2732.22, 2.15488, 2.00056, 6.45972, 0.643253, 128.348, 1.17689, 0.00923309, 8.02604, 2.95504, 38.6212, 0.927526, 1.19612, 1.26722, 0.820374, 315.393, 2.43714, 1.45339, 10.3102, 0.50202, 40.4652, 1.61799, 1.46276, 11.7883, ... }
./test/test_xfunction.cpp:442: Failure
Expected equality of these values:
  res3
    Which is: { 0.26585, 18.1336, 1.15235, 51.4432, 1.6515, 1.00398, 7.01535, 1.84907, 2732.22, 2.15488, 2.00056, 6.45972, 0.643253, 128.348, 1.17689, 0.00923309, 8.02604, 2.95504, 38.6212, 0.927526, 1.19612, 1.26722, 0.820374, 315.393, 2.43714, 1.45339, 10.3102, 0.50202, 40.4652, 1.61799, 1.46276, 11.7883, ... }
  res5
    Which is: { 0.26585, 18.1336, 1.15235, 51.4432, 1.6515, 1.00398, 7.01535, 1.84907, 2732.22, 2.15488, 2.00056, 6.45972, 0.643253, 128.348, 1.17689, 0.00923309, 8.02604, 2.95504, 38.6212, 0.927526, 1.19612, 1.26722, 0.820374, 315.393, 2.43714, 1.45339, 10.3102, 0.50202, 40.4652, 1.61799, 1.46276, 11.7883, ... }
./test/test_xfunction.cpp:443: Failure
Expected equality of these values:
  func
    Which is: { 0.26585, 18.1336, 1.15235, 51.4432, 1.6515, 1.00398, 7.01535, 1.84907, 2732.22, 2.15488, 2.00056, 6.45972, 0.643253, 128.348, 1.17689, 0.00923309, 8.02604, 2.95504, 38.6212, 0.927526, 1.19612, 1.26722, 0.820374, 315.393, 2.43714, 1.45339, 10.3102, 0.50202, 40.4652, 1.61799, 1.46276, 11.7883, ... }
  res5
    Which is: { 0.26585, 18.1336, 1.15235, 51.4432, 1.6515, 1.00398, 7.01535, 1.84907, 2732.22, 2.15488, 2.00056, 6.45972, 0.643253, 128.348, 1.17689, 0.00923309, 8.02604, 2.95504, 38.6212, 0.927526, 1.19612, 1.26722, 0.820374, 315.393, 2.43714, 1.45339, 10.3102, 0.50202, 40.4652, 1.61799, 1.46276, 11.7883, ... }
[  FAILED  ] xfunction.all_iterators (6 ms)
[ RUN      ] xnanfunctions.nanmean
./test/test_xnan_functions.cpp:157: Failure
Expected equality of these values:
  nanmean(nantest::aN, {1})
    Which is: { 63, 2, 1.66667 }
  eaN1
    Which is: { 63, 2, 1.66667 }
./test/test_xnan_functions.cpp:163: Failure
Expected equality of these values:
  nanmean(nantest::aN, {1}, evaluation_strategy::immediate)
    Which is: { 63, 2, 1.66667 }
  eaN1
    Which is: { 63, 2, 1.66667 }
./test/test_xnan_functions.cpp:177: Failure
Expected equality of these values:
  nanmean(nantest::cN, {1}, evaluation_strategy::immediate)
    Which is: { (1,1), (1.66667,0.333333) }
  ecN1
    Which is: { (1,1), (1.66667,0.333333) }
[  FAILED  ] xnanfunctions.nanmean (0 ms)
@JohanMabille
Copy link
Member

JohanMabille commented Mar 23, 2021

Do you have the same error on all architectures for test_xnpy? From the message you've posted, it is definitely a big endian / little endian issue (we need to fix the expected value in the test since we always assume little endian).
Regarding the other failures, they look like precision / rounding issues.

Is it easy for you to test any branch from Github? If so, I can push some changes that will help to diagnose the problem.

@drew-parsons
Copy link
Contributor Author

Not all arches. The test_xnpy failure is on s390x, hppa, powerpc, ppc64, sparc64. It passes on ARM in both armel (little endian) and armhf (arm64 also passes).

I can pull branches if needed to test (I can test on Debian experimental so the main distribution is not affected).

@drew-parsons
Copy link
Contributor Author

That is, test_xnpy passed on amd64, arm64, armel, armhf, i386, mips64el, ppc64el, alpha, ia64, m68k, riscv64, sh4, x32.

@drew-parsons
Copy link
Contributor Author

With xtensor 0.23.10, other tests now pass. Only the 3 tests in test_xnpy continue to fail. For s390x:

[----------] 3 tests from xnpy
[ RUN      ] xnpy.load
unknown file: Failure
C++ exception with description "Cast error: formats not matching <f8 vs >f8" thrown in the test body.
[  FAILED  ] xnpy.load (7 ms)
[ RUN      ] xnpy.dump
./test/test_xnpy.cpp:146: Failure
Value of: compare_binary_files(filename, compare_name)
  Actual: false
Expected: true
./test/test_xnpy.cpp:150: Failure
Expected equality of these values:
  ularr_str
    Which is: "\x93NUMPY\x1\0v\0{'descr': '>u8', 'fortran_order': False, 'shape': (5,), }                                                            \n\0\0\0\0\0\0\0\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\x12\xD5\x91"
  ularr_disk
    Which is: "\x93NUMPY\x1\0v\0{'descr': '<u8', 'fortran_order': False, 'shape': (5,), }                                                            \n\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\0\0\x91\xD5\x12\0\0\0\0\0"
With diff:
@@ -1,2 +1,2 @@
-\x93NUMPY\x1\0v\0{'descr': '>u8', 'fortran_order': False, 'shape': (5,), }                                                            
-\0\0\0\0\0\0\0\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\x12\xD5\x91
+\x93NUMPY\x1\0v\0{'descr': '<u8', 'fortran_order': False, 'shape': (5,), }                                                            
+\f\0\0\0\0\0\0\0\xE\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x12\0\0\0\0\0\0\0\x91\xD5\x12\0\0\0\0\0

Dumping boolean numpy file to string failed
[  FAILED  ] xnpy.dump (2 ms)
[ RUN      ] xnpy.xfunction_cast
unknown file: Failure
C++ exception with description "Cast error: formats not matching <f8 vs >f8" thrown in the test body.
[  FAILED  ] xnpy.xfunction_cast (0 ms)
[----------] 3 tests from xnpy (9 ms total)

@matwey
Copy link
Contributor

matwey commented Oct 19, 2022

Hi, I see the same issue with 0.24.3 on ppc64 (big endian architecture).

[  955s] 60/79 Test #60: test_xnpy .........................***Failed    0.01 sec
[  955s] [doctest] doctest version is "2.4.8"
[  955s] [doctest] run with "--help" for options
[  955s] ===============================================================================
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:39:
[  955s] TEST CASE:  xnpy.load
[  955s] 
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:39: ERROR: test case THREW exception: Cast error: formats not matching <f8 vs >f8
[  955s] 
[  955s] ===============================================================================
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:111:
[  955s] TEST CASE:  xnpy.dump
[  955s] 
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:144: ERROR: CHECK_EQ( compare_binary_files(filename, compare_name), true ) is NOT correct!
[  955s]   values: CHECK_EQ( false, true )
[  955s] 
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:148: ERROR: CHECK( ularr_str==ularr_disk ) is NOT correct!
[  955s]   values: CHECK( NUMPY )
[  955s]   logged: Dumping boolean numpy file to string failed
[  955s] 
[  955s] ===============================================================================
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:153:
[  955s] TEST CASE:  xnpy.xfunction_cast
[  955s] 
[  955s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.3/test/test_xnpy.cpp:153: ERROR: test case THREW exception: Cast error: formats not matching <f8 vs >f8
[  955s] 
[  955s] ===============================================================================
[  955s] [doctest] test cases: 3 | 0 passed | 3 failed | 0 skipped
[  955s] [doctest] assertions: 5 | 3 passed | 2 failed |
[  955s] [doctest] Status: FAILURE!
[  955s] 

matwey added a commit to matwey/xtensor that referenced this issue Nov 1, 2022
Partially fix xtensor-stack#2328 for i386 architecture.
tdegeus pushed a commit that referenced this issue Nov 16, 2022
Partially fix #2328 for i386 architecture.
@matwey
Copy link
Contributor

matwey commented Jan 4, 2024

The following is currently still failing for x86 arch for 0.24.7:

[  933s] [doctest] doctest version is "2.4.11"
[  933s] [doctest] run with "--help" for options
[  933s] Built without XSIMD
[  933s] Built without XSIMD
[  933s] ===============================================================================
[  933s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.7/test/test_xbuilder.cpp:146:
[  933s] TEST CASE:  xbuilder.arange_min_max_step
[  933s] 
[  933s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.7/test/test_xbuilder.cpp:166: FATAL ERROR: REQUIRE_EQ( 3.f * 0.3f, l3[{3}] ) is NOT correct!
[  933s]   values: REQUIRE_EQ( 0.9, 0.9 )
[  933s] 
[  933s] ===============================================================================
[  933s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.7/test/test_xcomplex.cpp:297:
[  933s] TEST CASE:  xcomplex.longdouble
[  933s] 
[  933s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.7/test/test_xcomplex.cpp:304: ERROR: CHECK_EQ( a(4, 4), cmplx(123.321, -123.321) ) is NOT correct!
[  933s]   values: CHECK_EQ( (123.321,-123.321), (123.321,-123.321) )
[  933s] 
[  933s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.7/test/test_xcomplex.cpp:308: ERROR: CHECK_EQ( a(0, 0), cmplx(-123.321, -123.321) ) is NOT correct!
[  933s]   values: CHECK_EQ( (-123.321,-123.321), (-123.321,-123.321) )
[  933s] 
[  933s] /home/abuild/rpmbuild/BUILD/xtensor-0.24.7/test/test_xcomplex.cpp:309: ERROR: CHECK_EQ( a(4, 4), cmplx(-123.321, -123.321) ) is NOT correct!
[  933s]   values: CHECK_EQ( (-123.321,-123.321), (-123.321,-123.321) )
[  933s] 
[  933s] ===============================================================================

@JohanMabille JohanMabille reopened this Jan 4, 2024
matwey added a commit to matwey/xtensor that referenced this issue Jan 4, 2024
@matwey
Copy link
Contributor

matwey commented Jan 4, 2024

Not sure how to reimplement test_xbuilder.cpp. The failure appears when gcc is used (it seems to use FPU instead of SSE for floating point).

@JohanMabille
Copy link
Member

Maybe we can use floating point comparisons / assertions instead

@matwey
Copy link
Contributor

matwey commented Jan 4, 2024

Maybe we can use floating point comparisons / assertions instead

I think it is enough to make the step be power of 2, like 0.25f

matwey added a commit to matwey/xtensor that referenced this issue Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants