Coder Social home page Coder Social logo

Unit test failure on i386 about pysph HOT 4 CLOSED

pypr avatar pypr commented on May 18, 2024
Unit test failure on i386

from pysph.

Comments (4)

avalentino avatar avalentino commented on May 18, 2024 1

@prabhuramachandran it works now.
Please feel free to close this issue

from pysph.

avalentino avatar avalentino commented on May 18, 2024

After the update to the latest git revision (e3d5e10) there are still 2 test failures:

============================= test session starts ==============================
platform linux -- Python 3.8.1, pytest-4.6.8, py-1.8.0, pluggy-0.13.0
rootdir: /<<PKGBUILDDIR>>, inifile: tox.ini
collected 889 items / 90 deselected / 799 selected

pysph/base/tests/test_device_helper.py .ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss [  4%]
FssFss.ss.ss.ss.ss.sss                                                   [  6%]
pysph/base/tests/test_domain_manager.py sss.........                     [  8%]
pysph/base/tests/test_kernel.py ........................................ [ 13%]
.................................................................        [ 21%]
pysph/base/tests/test_linalg3.py .......                                 [ 22%]
pysph/base/tests/test_neighbor_cache.py ....                             [ 22%]
pysph/base/tests/test_nnps.py .......ssssssssss......................... [ 28%]
....................................................ssssssssssssssssssss [ 37%]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss........ [ 46%]
.........................................                                [ 51%]
pysph/base/tests/test_octree.py .....s...s...s...s...s...s...s...s.      [ 55%]
pysph/base/tests/test_particle_array.py ................................ [ 59%]
...ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss        [ 67%]
pysph/base/tests/test_periodic_nnps.py ............                      [ 69%]
pysph/base/tests/test_reduce_array.py ......                             [ 70%]
pysph/base/tests/test_utils.py ..                                        [ 70%]
pysph/examples/tests/test_riemann_solver.py s........                    [ 71%]
pysph/parallel/tests/test_openmp.py .                                    [ 71%]
pysph/parallel/tests/test_parallel.py ssssss                             [ 72%]
pysph/parallel/tests/test_parallel_run.py s                              [ 72%]
pysph/solver/tests/test_application.py ...                               [ 72%]
pysph/solver/tests/test_solver.py ..                                     [ 73%]
pysph/solver/tests/test_solver_utils.py ......sssss.                     [ 74%]
pysph/sph/bc/tests/test_simple_inlet_outlet.py .......                   [ 75%]
pysph/sph/tests/test_acceleration_eval.py ....................ssssssssss [ 79%]
ssssssssssssssssssssssssssssssssssssssssssssss                           [ 84%]
pysph/sph/tests/test_acceleration_eval_cython_helper.py ...              [ 85%]
pysph/sph/tests/test_equations.py ...............                        [ 87%]
pysph/sph/tests/test_integrator.py ...............ssssssss               [ 90%]
pysph/sph/tests/test_integrator_cython_helper.py .                       [ 90%]
pysph/sph/tests/test_integrator_step.py ..                               [ 90%]
pysph/sph/tests/test_kernel_corrections.py ................              [ 92%]
pysph/sph/tests/test_linalg.py .............                             [ 94%]
pysph/sph/tests/test_multi_group_integrator.py .s                        [ 94%]
pysph/sph/tests/test_riemann_solver.py .............                     [ 95%]
pysph/sph/tests/test_scheme.py .                                         [ 96%]
pysph/tools/tests/test_geometry.py .............s...                     [ 98%]
pysph/tools/tests/test_geometry_stl.py ...........                       [ 99%]
pysph/tools/tests/test_interpolator.py ...                               [100%]

=================================== FAILURES ===================================
________________ TestDeviceHelper.test_remove_particles[cython] ________________

obj = array([         0,          0,   -2097152, 1106247679], dtype=int32)
method = 'take', args = (array([0, 3], dtype=uint32),)
kwds = {'axis': None, 'mode': 'raise', 'out': array([0, 0], dtype=int32)}
bound = <built-in method take of numpy.ndarray object at 0xf23e2958>

    def _wrapfunc(obj, method, *args, **kwds):
        bound = getattr(obj, method, None)
        if bound is None:
            return _wrapit(obj, method, *args, **kwds)
    
        try:
>           return bound(*args, **kwds)
E           TypeError: Cannot cast array data from dtype('uint32') to dtype('int32') according to the rule 'safe'

/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:61: TypeError

During handling of the above exception, another exception occurred:

self = <pysph.base.tests.test_device_helper.TestDeviceHelper object at 0xf246b688>
backend = 'cython'

    @test_all_backends
    def test_remove_particles(self, backend):
        check_import(backend)
        self.setup()
        # Given
        pa = self.pa
        h = DeviceHelper(pa, backend=backend)
    
        # When
        pa.set_device_helper(h)
        h.resize(4)
        h.x.set(np.array([2.0, 3.0, 4.0, 5.0], h.x.dtype))
    
        indices = np.array([1, 2], dtype=np.uint32)
        indices = array.to_device(indices, backend=backend)
    
>       h.remove_particles(indices)

pysph/base/tests/test_device_helper.py:295: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pysph/base/device_helper.py:446: in remove_particles
    self._remove_particles_bool(if_remove, align=align)
pysph/base/device_helper.py:405: in _remove_particles_bool
    self._data[prop] = self._data[prop].align(s_index)
/usr/lib/python3/dist-packages/compyle/array.py:887: in align
    return take(self, indices, backend=self.backend, out=out)
/usr/lib/python3/dist-packages/compyle/array.py:563: in take
    np.take(ary.dev, indices.dev, out=out.dev)
<__array_function__ internals>:5: in take
    ???
/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:194: in take
    return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:70: in _wrapfunc
    return _wrapit(obj, method, *args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

obj = array([         0,          0,   -2097152, 1106247679], dtype=int32)
method = 'take', args = (array([0, 3], dtype=uint32),)
kwds = {'axis': None, 'mode': 'raise', 'out': array([0, 0], dtype=int32)}
wrap = <built-in method __array_wrap__ of numpy.ndarray object at 0xf23e2958>

    def _wrapit(obj, method, *args, **kwds):
        try:
            wrap = obj.__array_wrap__
        except AttributeError:
            wrap = None
>       result = getattr(asarray(obj), method)(*args, **kwds)
E       TypeError: Cannot cast array data from dtype('uint32') to dtype('int32') according to the rule 'safe'

/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:47: TypeError
----------------------------- Captured stdout call -----------------------------
running build_ext
cythoning /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_ce49303592cccc0f47d12e62e446115e.pyx to /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_ce49303592cccc0f47d12e62e446115e.cpp
building 'm_ce49303592cccc0f47d12e62e446115e' extension
i686-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include/python3.8 -c /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_ce49303592cccc0f47d12e62e446115e.cpp -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/temp.linux-i386-3.8/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_ce49303592cccc0f47d12e62e446115e.o -fopenmp
i686-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -Wl,-z,now -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/temp.linux-i386-3.8/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_ce49303592cccc0f47d12e62e446115e.o -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/lib.linux-i386-3.8/m_ce49303592cccc0f47d12e62e446115e.cpython-38-i386-linux-gnu.so -fopenmp
running build_ext
cythoning /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_bd6d6a8ab7b1792aab85d10bcb603670.pyx to /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_bd6d6a8ab7b1792aab85d10bcb603670.cpp
building 'm_bd6d6a8ab7b1792aab85d10bcb603670' extension
i686-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include/python3.8 -c /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_bd6d6a8ab7b1792aab85d10bcb603670.cpp -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/temp.linux-i386-3.8/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_bd6d6a8ab7b1792aab85d10bcb603670.o -fopenmp
i686-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -Wl,-z,now -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/temp.linux-i386-3.8/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_bd6d6a8ab7b1792aab85d10bcb603670.o -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/lib.linux-i386-3.8/m_bd6d6a8ab7b1792aab85d10bcb603670.cpython-38-i386-linux-gnu.so -fopenmp
running build_ext
cythoning /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_5df2595d151df615d925d6d92dc9c48e.pyx to /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_5df2595d151df615d925d6d92dc9c48e.cpp
building 'm_5df2595d151df615d925d6d92dc9c48e' extension
i686-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include/python3.8 -c /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_5df2595d151df615d925d6d92dc9c48e.cpp -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/temp.linux-i386-3.8/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_5df2595d151df615d925d6d92dc9c48e.o -fopenmp
i686-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -Wl,-z,now -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/temp.linux-i386-3.8/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/m_5df2595d151df615d925d6d92dc9c48e.o -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/.compyle/source/py3.8-linux-i386/build/lib.linux-i386-3.8/m_5df2595d151df615d925d6d92dc9c48e.cpython-38-i386-linux-gnu.so -fopenmp
____________ TestDeviceHelper.test_remove_tagged_particles[cython] _____________

obj = array([0, 0, 1, 0, 1], dtype=int32), method = 'take'
args = (array([0, 1, 3], dtype=uint32),)
kwds = {'axis': None, 'mode': 'raise', 'out': array([ 1262746869, -2117160148,   925122456], dtype=int32)}
bound = <built-in method take of numpy.ndarray object at 0xf2cc9728>

    def _wrapfunc(obj, method, *args, **kwds):
        bound = getattr(obj, method, None)
        if bound is None:
            return _wrapit(obj, method, *args, **kwds)
    
        try:
>           return bound(*args, **kwds)
E           TypeError: Cannot cast array data from dtype('uint32') to dtype('int32') according to the rule 'safe'

/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:61: TypeError

During handling of the above exception, another exception occurred:

self = <pysph.base.tests.test_device_helper.TestDeviceHelper object at 0xf29d9370>
backend = 'cython'

    @test_all_backends
    def test_remove_tagged_particles(self, backend):
        check_import(backend)
        self.setup()
        # Given
        pa = self.pa
        h = DeviceHelper(pa, backend=backend)
    
        # When
        pa.set_device_helper(h)
        h.resize(5)
        h.x.set(np.array([2.0, 3.0, 4.0, 5.0, 6.0], h.x.dtype))
        h.tag.set(np.array([0, 0, 1, 0, 1], h.tag.dtype))
    
>       h.remove_tagged_particles(1)

pysph/base/tests/test_device_helper.py:314: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pysph/base/device_helper.py:461: in remove_tagged_particles
    self._remove_particles_bool(if_remove, align=align)
pysph/base/device_helper.py:405: in _remove_particles_bool
    self._data[prop] = self._data[prop].align(s_index)
/usr/lib/python3/dist-packages/compyle/array.py:887: in align
    return take(self, indices, backend=self.backend, out=out)
/usr/lib/python3/dist-packages/compyle/array.py:563: in take
    np.take(ary.dev, indices.dev, out=out.dev)
<__array_function__ internals>:5: in take
    ???
/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:194: in take
    return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:70: in _wrapfunc
    return _wrapit(obj, method, *args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

obj = array([0, 0, 1, 0, 1], dtype=int32), method = 'take'
args = (array([0, 1, 3], dtype=uint32),)
kwds = {'axis': None, 'mode': 'raise', 'out': array([ 1262746869, -2117160148,   925122456], dtype=int32)}
wrap = <built-in method __array_wrap__ of numpy.ndarray object at 0xf2cc9728>

    def _wrapit(obj, method, *args, **kwds):
        try:
            wrap = obj.__array_wrap__
        except AttributeError:
            wrap = None
>       result = getattr(asarray(obj), method)(*args, **kwds)
E       TypeError: Cannot cast array data from dtype('uint32') to dtype('int32') according to the rule 'safe'

/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:47: TypeError

= 2 failed, 514 passed, 283 skipped, 90 deselected, 64 warnings in 361.13 seconds =

from pysph.

prabhuramachandran avatar prabhuramachandran commented on May 18, 2024

@adityapb -- would it be possible to take a quick look?

from pysph.

prabhuramachandran avatar prabhuramachandran commented on May 18, 2024

@avalentino -- is this still broken?

from pysph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.