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

spectralDNS tests fail because it expects the function pyfftw.builders.dct #6

Closed
ashwinvis opened this issue Jan 18, 2018 · 3 comments

Comments

@ashwinvis
Copy link

When I run pytest -v I see a lot of test failures (see test summary below):

test_MHD.py::test_MHD[uniform] PASSED                                                                                                                                                          [  2%]
test_MHD.py::test_MHD[nonuniform] PASSED                                                                                                                                                       [  4%]
test_NS2D.py::test_NS2D[1] PASSED                                                                                                                                                              [  6%]
test_NS2D.py::test_NS2D[2] PASSED                                                                                                                                                              [  8%]
test_NSVV.py::test_solvers[NS_uniform] PASSED                                                                                                                                                  [ 10%]
test_NSVV.py::test_solvers[VV_uniform] PASSED                                                                                                                                                  [ 12%]
test_NSVV.py::test_solvers[NS_nonuniform] PASSED                                                                                                                                               [ 14%]
test_NSVV.py::test_solvers[VV_nonuniform] PASSED                                                                                                                                               [ 16%]
test_NSVV.py::test_integrators[NS_uniform] FAILED                                                                                                                                              [ 18%]
test_NSVV.py::test_integrators[VV_uniform] FAILED                                                                                                                                              [ 20%]
test_NSVV.py::test_integrators[NS_nonuniform] FAILED                                                                                                                                           [ 22%]
test_NSVV.py::test_integrators[VV_nonuniform] FAILED                                                                                                                                           [ 24%]
test_channel.py::test_channel[KMMRK3] FAILED                                                                                                                                                   [ 26%]
test_channel.py::test_channel[KMM] FAILED                                                                                                                                                      [ 28%]
test_channel.py::test_channel[IPCS] SKIPPED                                                                                                                                                    [ 30%]
test_channel.py::test_channel[IPCSR] SKIPPED                                                                                                                                                   [ 32%]
test_channel.py::test_channel[KMMRK3_mpifft4py] FAILED                                                                                                                                         [ 34%]
test_channel.py::test_channel[KMM_mpifft4py] FAILED                                                                                                                                            [ 36%]
test_shentransforms.py::test_FST[GC-Basis] FAILED                                                                                                                                              [ 38%]
test_shentransforms.py::test_FST[GC-ShenDirichletBasis] FAILED                                                                                                                                 [ 40%]
test_shentransforms.py::test_FST[GC-ShenNeumannBasis] FAILED                                                                                                                                   [ 42%]
test_shentransforms.py::test_FST[GC-ShenBiharmonicBasis] FAILED                                                                                                                                [ 44%]
test_shentransforms.py::test_FST[GL-Basis] FAILED                                                                                                                                              [ 46%]
test_shentransforms.py::test_FST[GL-ShenDirichletBasis] FAILED                                                                                                                                 [ 48%]
test_shentransforms.py::test_FST[GL-ShenNeumannBasis] FAILED                                                                                                                                   [ 51%]
test_shentransforms.py::test_FST[GL-ShenBiharmonicBasis] FAILED                                                                                                                                [ 53%]
test_shentransforms.py::test_FST_padded[GC-Basis] FAILED                                                                                                                                       [ 55%]
test_shentransforms.py::test_FST_padded[GC-ShenDirichletBasis] FAILED                                                                                                                          [ 57%]
test_shentransforms.py::test_FST_padded[GC-ShenNeumannBasis] FAILED                                                                                                                            [ 59%]
test_shentransforms.py::test_FST_padded[GC-ShenBiharmonicBasis] FAILED                                                                                                                         [ 61%]
test_shentransforms.py::test_FST_padded[GL-Basis] FAILED                                                                                                                                       [ 63%]
test_shentransforms.py::test_FST_padded[GL-ShenDirichletBasis] FAILED                                                                                                                          [ 65%]
test_shentransforms.py::test_FST_padded[GL-ShenNeumannBasis] FAILED                                                                                                                            [ 67%]
test_shentransforms.py::test_FST_padded[GL-ShenBiharmonicBasis] FAILED                                                                                                                         [ 69%]
test_shentransforms.py::test_Mult_Div FAILED                                                                                                                                                   [ 71%]
test_shentransforms.py::test_Helmholtz[GC-ShenDirichletBasis] FAILED                                                                                                                           [ 73%]
test_shentransforms.py::test_Helmholtz[GC-ShenNeumannBasis] FAILED                                                                                                                             [ 75%]
test_shentransforms.py::test_Helmholtz[GL-ShenDirichletBasis] FAILED                                                                                                                           [ 77%]
test_shentransforms.py::test_Helmholtz[GL-ShenNeumannBasis] FAILED                                                                                                                             [ 79%]
test_shentransforms.py::test_Helmholtz2[GC] FAILED                                                                                                                                             [ 81%]
test_shentransforms.py::test_Helmholtz2[GL] FAILED                                                                                                                                             [ 83%]
test_shentransforms.py::test_Mult_CTD[GC] FAILED                                                                                                                                               [ 85%]
test_shentransforms.py::test_Mult_CTD[GL] FAILED                                                                                                                                               [ 87%]
test_shentransforms.py::test_Mult_CTD_3D[GC] FAILED                                                                                                                                            [ 89%]
test_shentransforms.py::test_Mult_CTD_3D[GL] FAILED                                                                                                                                            [ 91%]
test_shentransforms.py::test_Biharmonic[GC] FAILED                                                                                                                                             [ 93%]
test_shentransforms.py::test_Biharmonic[GL] FAILED                                                                                                                                             [ 95%]
test_shentransforms.py::test_Helmholtz_matvec[GC] FAILED                                                                                                                                       [ 97%]
test_shentransforms.py::test_Helmholtz_matvec[GL] FAILED                                                                                                                                       [100%]

Most of the failures are due to AttributeErrors like:

self = <shenfun.chebyshev.bases.Basis object at 0x7fd643bd4910>, N = 64, quad = 'GL', plan = True, domain = (-1.0, 1.0)

    def __init__(self, N=0, quad="GC", plan=False, domain=(-1., 1.)):
        ChebyshevBase.__init__(self, N, quad, domain)
        if quad == 'GC':
            self._xfftn_fwd = functools.partial(pyfftw.builders.dct, type=2)
            self._xfftn_bck = functools.partial(pyfftw.builders.dct, type=3)
        else:
>           self._xfftn_fwd = functools.partial(pyfftw.builders.dct, type=1)
E           AttributeError: 'module' object has no attribute 'dct'

/scratch/avmo/opt/spectraldns/lib/python2.7/site-packages/shenfun/chebyshev/bases.py:202: AttributeError

I am using the latest version of pyfftw

» pip show pyfftw
Name: pyFFTW
Version: 0.10.4
Summary: A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms.
Home-page: http://hgomersall.github.com/pyFFTW/
Author: Henry Gomersall
Author-email: heng@kedevelopments.co.uk
License: UNKNOWN
Location: /scratch/avmo/opt/spectraldns/lib/python2.7/site-packages
Requires: 

And even in their github master version I don't see this dct function: https://github.com/pyFFTW/pyFFTW/blob/master/pyfftw/builders/builders.py. Are you using a modified version of pyFFTW?

@mikaem
Copy link
Member

mikaem commented Jan 18, 2018

Hi
and thanks for creating this issue. Unfortunately, the dct is not part of the main pyfftw, but it has been implemented in this branch. It is also available in the spectralDNS channel on Anaconda cloud.

@ashwinvis
Copy link
Author

Thank you @mikaem! All tests pass 👍

@ashwinvis
Copy link
Author

ashwinvis commented Jan 19, 2018

Referencing issue spectralDNS/spectralDNS/issues/23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants