Skip to content

Getting ValueError: Internal error in both OS X and CentOS, with anaconda, python 3.6, mkl 1.0.6, numpy 1.15.1. #24

Closed
@oleksandr-pavlyk

Description

@oleksandr-pavlyk

Doing scipy.signal.fftconvolve:

import numpy as np
from scipy.signal import fftconvolve
d1 = np.random.rand(18768768)
d2 = np.random.rand(15243648)
xcraw = fftconvolve(d1, d2, mode='full')

leads to:

/Users/<user>/anaconda3/envs/py36/lib/python3.6/site-packages/mkl_fft/_numpy_fft.py:1044: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
  output = mkl_fft.rfftn_numpy(a, s, axes)
Traceback (most recent call last):
  File "/Users/<user>/anaconda3/envs/py36/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2910, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-15-98737a11a4f0>", line 1, in <module>
    xcraw = fftconvolve(d1, d2, mode='full')
  File "/Users/<user>/anaconda3/envs/py36/lib/python3.6/site-packages/scipy/signal/signaltools.py", line 391, in fftconvolve
    sp1 = np.fft.rfftn(in1, fshape)
  File "/Users/<user>/anaconda3/envs/py36/lib/python3.6/site-packages/mkl_fft/_numpy_fft.py", line 1044, in rfftn
    output = mkl_fft.rfftn_numpy(a, s, axes)
  File "mkl_fft/_pydfti.pyx", line 834, in mkl_fft._pydfti.rfftn_numpy
  File "mkl_fft/_pydfti.pyx", line 588, in mkl_fft._pydfti.rfft_numpy
  File "mkl_fft/_pydfti.pyx", line 504, in mkl_fft._pydfti._rc_fft1d_impl
ValueError: Internal error occurred, with status=-1

Numpy config is:

(py36) [kime9@l-1-01 AudVidSync]$ python -c "import numpy; print(numpy.show_config())"
mkl_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/home/kime9/anaconda3/envs/py36/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/kime9/anaconda3/envs/py36/include']
blas_mkl_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/home/kime9/anaconda3/envs/py36/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/kime9/anaconda3/envs/py36/include']
blas_opt_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/home/kime9/anaconda3/envs/py36/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/kime9/anaconda3/envs/py36/include']
lapack_mkl_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/home/kime9/anaconda3/envs/py36/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/kime9/anaconda3/envs/py36/include']
lapack_opt_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/home/kime9/anaconda3/envs/py36/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/home/kime9/anaconda3/envs/py36/include']
None

I get the same error for:
noverlap = fftconvolve(np.ones(d1), np.ones(d2), mode='full')

Taking @oleksandr-pavlyk's advice and doing
np.fft.restore_all()
works around the error.

Is this worth opening a ticket, or am I doing something wrong? Am I describing this in a way that is useful?

Originally posted by @kusanagee in #11 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions