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

fftw_threads symbols #13

Open
colinjcotter opened this issue Sep 30, 2021 · 3 comments
Open

fftw_threads symbols #13

colinjcotter opened this issue Sep 30, 2021 · 3 comments

Comments

@colinjcotter
Copy link

I get an import error when executing: from mpi4py_fft.fftw import fftw_xfftn

In [1]: from mpi4py_fft.fftw import fftw_xfftn

ImportError Traceback (most recent call last)
in
----> 1 from mpi4py_fft.fftw import fftw_xfftn

ImportError: dlopen(/Users/colincotter/firedrake-fftw2/lib/python3.8/site-packages/mpi4py_fft/fftw/fftw_xfftn.cpython-38-darwin.so, 2): Symbol not found: _fftw_cleanup_threads
Referenced from: /Users/colincotter/firedrake-fftw2/lib/python3.8/site-packages/mpi4py_fft/fftw/fftw_xfftn.cpython-38-darwin.so
Expected in: flat namespace
in /Users/colincotter/firedrake-fftw2/lib/python3.8/site-packages/mpi4py_fft/fftw/fftw_xfftn.cpython-38-darwin.so

I have built fftw with --enable-threads --enable-shared (I'm asking PETSc to build it because I need to ensure that I'm using the right mpi library). libfftw3_threads can be found in the PETSc lib and I am adding the PETSc lib and include directories to FFTW_INCLUDE_DIR and FFTW_LIBRARY_DIR. How can I get mpi4py_fft to pick up these symbols?

@mikaem
Copy link
Member

mikaem commented Sep 30, 2021

Hi Colin,
Not sure I can be of much help. Do you install mpi4py_fft from source? And you actually find the FFTW libraries during setup, but there are missing symbols? We do make use of both FFTW_INCLUDE_DIR and FFTW_LIBRARY_DIR in the setup.

@colinjcotter
Copy link
Author

colinjcotter commented Sep 30, 2021 via email

@colinjcotter
Copy link
Author

OK, so I discovered that this issue only arises if I pip install mpi4py-fft from pypi and not if I clone the git repository and pip install from there.

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