Open ghisvail opened 8 years ago
Any news on this?
Hi Ghislain, I'll get to it tomorrow. Thanks for the report!
2016-01-30 16:42 GMT+01:00 Ghislain Antony Vaillant < notifications@github.com>:
Any news on this?
— Reply to this email directly or view it on GitHub https://github.com/pchanial/pyoperators/issues/23#issuecomment-177213406 .
La propagande est à la démocratie ce que la violence est à la dictature. Noam Chomsky
Any news on that?
I still get the ValueError: Attempted relative import in non-package
with 0.13.11
.
I believe all relative imports listed above should be replaced by from pyoperators.<module_name>
.
I am putting my last comment back, common
belongs to the testsuite folder. If the testsuite is intended as a module, why not putting as part of pyoperators
then? Otherwise, how do you run the testsuite?
Otherwise, how do you run the testsuite?
Linked with #24. A missing __init__.py
file under test/
from the current PyPI release tarball.
I've been working on it these last days. Could you please check if 0.13.12 still exhibits these failures?
The testsuite now runs, but there are still a few things:
======================================================================
FAIL: test.test_iterative.test_classes_inv(<class 'pyoperators.iterative.cg.PCGAlgorithm'>, DiagonalOperator(array([0.420375900877, ..., 0.366200462168], dtype=float64), broadcast='disabled', shapein=16, shapeout=16), array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/tmp/autopkgtest.RYRul9/adttmp/test/test_iterative.py", line 47, in func
assert_allclose(x, xe, rtol=1e-6)
File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 1395, in assert_allclose
verbose=verbose, header=header)
File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 737, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1e-06, atol=0
(mismatch 6.25%)
x: array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
y: array([ 1.000002, 2. , 3. , 4. , 5. ,
6. , 7. , 8. , 9. , 10. ,
11. , 12. , 13. , 14. , 15. , 16. ])
$HOME
. Why is so ? Since package building environment don't allow writes to $HOME, I get a PyOperatorsWarning
when the testsuite is run with Python 3, but an OSError
with Python 2.=== python2.7 ===
EEEEEEEEEEEEEEEESEEEEEEEE
======================================================================
ERROR: Failure: OSError ([Errno 13] Permission denied: '/home/ghislain')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/tmp/autopkgtest.RYRul9/adttmp/test/test_algorithms.py", line 5, in <module>
from pyoperators.iterative.core import IterativeAlgorithm
File "/usr/lib/python2.7/dist-packages/pyoperators/__init__.py", line 13, in <module>
from .utils import *
File "/usr/lib/python2.7/dist-packages/pyoperators/utils/__init__.py", line 2, in <module>
from . import mpi
File "/usr/lib/python2.7/dist-packages/pyoperators/utils/mpi.py", line 6, in <module>
from .. import config
File "/usr/lib/python2.7/dist-packages/pyoperators/config.py", line 27, in <module>
_os.makedirs(LOCAL_PATH)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/home/ghislain'
=== python3.5 ===
/usr/lib/python3/dist-packages/pyoperators/config.py:30: PyOperatorsWarning: User path '/home/ghislain/.local/share/pyoperators' cannot be created.
_PyOperatorsWarning)
And most importantly, the testsuite fails for pretty much all architectures but amd64
. The fact that the testsuite don't even complete on i386
(32-bit Intel) is troublesome. You can find all build logs here. Please consider investigating this.
I can confirm that the tests implemented in test_iterative.py
are not reliable. I had to explicitly disable them in nose
to obtain reproducible test results in the package builders.
Most of the build errors should now be fixed in 0.13.13. I don't have a non 64 bits computer to test them (PyOperators targets HPC, though). Thanks for the reports! I'm writing in user's HOME to store the FFTW wisdom file. It enables huge performance gain (the wisdom files remember the fastest FFT strategy for a given size after they have been tried one after the other)
Err... 0.13.14 should also fix the test failures when numexpr is not present.
Ok, I'll refresh the packaging and report if there are still issues. Thanks for the prompt fixes.
Still fails on 32-bit for v0.13.13
on PyPI:
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'float128')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_broadcastingoperators.py", line 25, in <module>
np.float64, np.float128, np.complex128, np.complex256)
AttributeError: 'module' object has no attribute 'float128'
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'float128')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 251, in generate
for test in g():
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_linear.py", line 26, in test_degrees
for dtype in (np.float16, np.float32, np.float64, np.float128):
AttributeError: 'module' object has no attribute 'float128'
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'float128')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 251, in generate
for test in g():
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_linear.py", line 113, in test_radians
for dtype in (np.float16, np.float32, np.float64, np.float128):
AttributeError: 'module' object has no attribute 'float128'
======================================================================
ERROR: Failure: ValueError (low is out of bounds for int32)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 251, in generate
for test in g():
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_mpi.py", line 31, in test_allreduce
x = np.random.random_integers(i.min, i.max-1, size=n).astype(dtype)
File "mtrand.pyx", line 1774, in mtrand.RandomState.random_integers (numpy/random/mtrand/mtrand.c:18140)
File "mtrand.pyx", line 1260, in mtrand.RandomState.randint (numpy/random/mtrand/mtrand.c:14410)
ValueError: low is out of bounds for int32
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'float128')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 251, in generate
for test in g():
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_ufuncs.py", line 10, in test_abs2
x = np.array([pi(np.float128) + 1j, pi(np.float128)*1j, 3])
AttributeError: 'module' object has no attribute 'float128'
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'float128')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_utils.py", line 24, in <module>
np.float64, np.float128, np.complex64, np.complex128, np.complex256)]
AttributeError: 'module' object has no attribute 'float128'
======================================================================
FAIL: test.test_delete.test_collection_reset
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_delete.py", line 25, in test_collection_reset
assert memory._gc_nbytes_counter - counter == 8
AssertionError
======================================================================
FAIL: test.test_delete.test_collection
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_delete.py", line 41, in test_collection
assert memory._gc_nbytes_counter == 0
AssertionError
======================================================================
FAIL: test.test_nbytes.test_sparse(<class 'scipy.sparse.dok.dok_matrix'>, 2688)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/<<PKGBUILDDIR>>/.pybuild/pythonX.Y_2.7/build/test/test_nbytes.py", line 31, in func
assert_equal(op.nbytes, expected)
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 379, in assert_equal
raise AssertionError(msg)
AssertionError:
Items are not equal:
ACTUAL: 1792
DESIRED: 2688
----------------------------------------------------------------------
Ran 4021 tests in 7.670s
FAILED (SKIP=17, errors=6, failures=3)
For the error, looks like neither float128
nor complex256
are available on 32-bit numpy, something a try / catch block or a hasattr
call should help you solve.
For the failures, not sure what you are trying to test, so I'll let you investigate how the assertion happens to be false on 32-bit.
The new logs are available here. Still a large range of architectures failing.
I have fixed a good number of issues related to 32bits platforms, float128 handling and big endian platforms. Could you please rerun the testsuite using 0.13.13.post04? Thanks!
Hey Pierre, I have another batch of test suite failures to report after upgrading the packaging to the latest
0.13.10
tag. This triggered an autoremoval request from Debian, since the package build cannot pass with the test failing. Could you please have a look at it? Thanks.