PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
2.04k stars 470 forks source link

Package seems broken on ppc64le #607

Open rgommers opened 2 years ago

rgommers commented 2 years ago

The conda-forge feedstock gained a ppc64le build, but it looks completely broken, see https://github.com/conda-forge/pywavelets-feedstock/pull/42. We don't have ppc64le CI on this repo, which is probably the right thing to add, rather than debug on conda-forge.

rgommers commented 2 years ago

Test results in gh-508 are better (only 2 failures), so part of this may be conda-forge specific.

jakirkham commented 2 years ago

The conda-forge builds are also emulated, which can sometimes run into unique issues

Other thing worth noting (maybe obvious though) is conda-forge is building with the last release. So any changes here since the last release may have fixed issues we are seeing in the conda-forge builds in the interim

rgommers commented 2 years ago

So any changes here since the last release may have fixed issues we are seeing in the conda-forge builds in the interim

I don't think there were any that would have fixed what we're seeing there. Emulation could well be the problem here though.

carterbox commented 2 years ago

The conda-forge builds are also emulated, which can sometimes run into unique issues

Are all ppc64le feedstocks being moved from Travis to Azure? If emulation is the problem, can you not move back to Travis?

jakirkham commented 2 years ago

@carterbox, if you would like to explore fixing the ppc64le packages, that would be welcome :)

carterbox commented 2 years ago

@jakirkham, I would be happy to try, but I am still wondering if y'all have any insight into why a bot moved the package from Travis to Azure in the first place.

rgommers commented 1 year ago

Similar test errors for swt with PyPy on Linux aarch64 and on x86-64 macOS, see https://github.com/conda-forge/pywavelets-feedstock/pull/53#issuecomment-1732584146. That has full tracebacks; the test_swt_roundtrip_dtypes test failure overlaps with ppc64le, shows RuntimeError: C wavelet transform failed with error code 4.. And error code 5 also shows up.

The error is happening on line 272 of _swt.pyx:

                cD = np.zeros(output_shape, dtype=np.complex128)
                with nogil:
                    retval = c_wt.double_complex_downcoef_axis(
                        <double complex *> data.data, data_info,
                        <double complex *> cD.data, output_info,
                        wavelet.w, axis,
                        common.COEF_DETAIL, common.MODE_PERIODIZATION,
                        i, common.SWT_TRANSFORM)
                if retval:
                    raise RuntimeError(
                        "C wavelet transform failed with error code %d" %
                        retval)
rgommers commented 1 year ago

That code is full of casts, and assumptions like size_t and Py_ssize_t being compatible. That's probably true but not guaranteed. A bit hard to untangle.