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

RuntimeError: Failure creating FFTW plan #15

Closed
applejwjcat opened this issue Mar 5, 2022 · 7 comments
Closed

RuntimeError: Failure creating FFTW plan #15

applejwjcat opened this issue Mar 5, 2022 · 7 comments

Comments

@applejwjcat
Copy link

Hi,
I have install mpi4py-fft from command conda install -c conda-forge mpi4py-fft, And it output no error when I import it.
However , when I run the test file, it output the errors like that:

Traceback (most recent call last):
  File "/home/tristan/learn_fft/mpi4py-fft/tests/test_fftw.py", line 162, in <module>
    test_fftw()
  File "/home/tristan/learn_fft/mpi4py-fft/tests/test_fftw.py", line 101, in test_fftw
    dct = fftw.dctn(input_array, None, axes, type, threads, fflags, output_array=oa)
  File "/home/tristan/.local/software/anaconda3/lib/python3.8/site-packages/mpi4py_fft/fftw/xfftn.py", line 397, in dctn
    return get_planned_FFT(input_array, output_array, axes, kind, threads,
  File "/home/tristan/.local/software/anaconda3/lib/python3.8/site-packages/mpi4py_fft/fftw/factory.py", line 106, in get_planned_FFT
    return _fft.FFT(input_array, output_array, axes, kind, threads, flags,
  File "mpi4py_fft/fftw/fftwf_xfftn.pyx", line 153, in mpi4py_fft.fftw.fftwf_xfftn.FFT.__cinit__
RuntimeError: Failure creating FFTW plan

I can't run the pfft_example.py with the same error, I think it is from the FFTW library.
I built my fftw library like this :

./configure --prefix=$HOME/.local/software/fftw-3.3.10 --enable-shared --enable-mpi --enable-float

and I have the bin file in my $PATH, also the lib file in my $LD_LIBRARY_PATH, is there something wrong I did?
Could you give me some advice, please?
Thanks

@applejwjcat
Copy link
Author

I have also installed h5py and mpi4py modules.

@Kral-Chen
Copy link

I have the same problem

@mikaem
Copy link
Member

mikaem commented Apr 12, 2022

Hi
Did you try to use the FFTW library that is installed automatically from conda-forge when you install mpi4py-fft? That version is configured appropriately and should work. You do not need FFTW built with MPI.

@Kral-Chen
Copy link

My anaconda python version was 3.8.8 before. Using conda update anaconda and conda update --all to upgrade anaconda python to version 3.8.13 and other packages. This problem is gone now. I'm not sure if it's caused by incompatible versions.

@applejwjcat
Copy link
Author

Hi
Did you try to use the FFTW library that is installed automatically from conda-forge when you install mpi4py-fft? That version is configured appropriately and should work. You do not need FFTW built with MPI.

Thanks, actually, I installed the FFTW library manually and copied it to the conda library, it may incompatible with the mpi4py-fft, I used your method, and it works well

@pgrete
Copy link

pgrete commented Jun 21, 2022

Hi Did you try to use the FFTW library that is installed automatically from conda-forge when you install mpi4py-fft? That version is configured appropriately and should work. You do not need FFTW built with MPI.

I'm running into the same problem.

What is the appropriate configuration? @dalcinl
I'm asking as I'd prefer to use a virtualenv based on the python/mpi/mpi4py/fftw stack provided by the HPC facility rather than a custom conda version.

@dalcinl
Copy link
Member

dalcinl commented Jun 22, 2022

@pgrete Using python/mpi/mpi4py/fftw stack provided by the HPC facility should be totally fine. Just pip install mpi4py-fft in your virtualenv. Prior to pip install, you may need to set the environment variable FFTW_ROOT (or FFTW_DIR) pointing to the prefix directory of the FFTW installation, or FFTW_{INCLUDE|LIBRARY}_DIR if headers and libraries are installed separated (see the logics in mpi4py-fft's setup.py).

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

5 participants