Control: tag -1 patch

This bug actually summarizes three diffferent causes for FTBFS:

1. Generic 32-bit problem
=========================

This is a test failure that happens on all 32-bit architectures

ERROR: Failure: ValueError (Buffer dtype mismatch, expected 'int64_t'
but got 'int')
----------------------------------------------------------------------
[...]
  File "yt/geometry/particle_smooth.pyx", line 352, in
yt.geometry.particle_smooth.ParticleSmoothOperation.process_particles
(yt/geometry/particle_smooth.c:6368)
    pind = np.argsort(pdoms)

A patch for this bug is atached.

2. i386 specific
================

Additionally to the generic problem, on i386 there is the following
failure, due to too tight limits:

FAIL:
yt.utilities.tests.test_interpolators.test_linear_interpolator_3d(array([[[
0.50968573,  0.28017296,  0.89075127, ...,  0.35230862,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line
811, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line
737, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not equal

(mismatch 0.721740722656%)
 x: array([[[ 0.509686,  0.280173,  0.890751, ...,  0.352309,  0.269049,
          0.469795],
        [ 0.667457,  0.236116,  0.546911, ...,  0.743981,  0.271074,...
 y: array([[[ 0.509686,  0.280173,  0.890751, ...,  0.352309,  0.269049,
          0.469795],
        [ 0.667457,  0.236116,  0.546911, ...,  0.743981,  0.271074,...
>>  raise AssertionError('\nArrays are not equal\n\n(mismatch
0.721740722656%)\n x: array([[[ 0.509686,  0.280173,  0.890751, ...,
0.352309,  0.269049,\n          0.469795],\n        [ 0.667457,
0.236116,  0.546911, ...,  0.743981,  0.271074,...\n y: array([[[
0.509686,  0.280173,  0.890751, ...,  0.352309,  0.269049,\n
0.469795],\n        [ 0.667457,  0.236116,  0.546911, ...,  0.743981,
0.271074,...')

A patch which looses the limits here is attached as well.

3. s390x specific
=================

On s390, a "division by zero" appears caused by matplotlib bug #803411.
This should be fixed in matplotlib itself.

After the two patches are applied, yt builds successfully on i386.

Best regards

Ole

Description: Fix remaining 32-bit FTBFS cause
Author:  Ole Streicher <oleb...@debian.org>
--- a/yt/geometry/particle_smooth.pyx
+++ b/yt/geometry/particle_smooth.pyx
@@ -349,8 +349,7 @@
         # Note that what we will be providing to our processing functions will
         # actually be indirectly-sorted fields.  This preserves memory at the
         # expense of additional pointer lookups.
-        pind = np.argsort(pdoms)
-        pind = np.asarray(pind, dtype='int64', order='C')
+        pind = np.asarray(np.argsort(pdoms), dtype='int64', order='C')
         # So what this means is that we now have all the oct-0 particle indices
         # in order, then the oct-1, etc etc.
         # This now gives us the indices to the particles for each domain.
Description: Fix remaining i386 FTBFS
Author:  Ole Streicher <oleb...@debian.org>
--- a/yt/utilities/tests/test_interpolators.py
+++ b/yt/utilities/tests/test_interpolators.py
@@ -49,7 +49,7 @@
                np.mgrid[0.0:1.0:64j, 0.0:1.0:64j, 0.0:1.0:64j]))
     tfi = lin.TrilinearFieldInterpolator(random_data,
             (0.0, 1.0, 0.0, 1.0, 0.0, 1.0), "xyz", True)
-    yield assert_array_equal, tfi(fv), random_data
+    yield assert_array_almost_equal, tfi(fv), random_data
 
     # randomly spaced bins
     size = 64

Reply via email to