mpi4py / mpi4py-fft

mpi4py-fft is a Python package for computing Fast Fourier Transforms (FFTs).
Other
50 stars 12 forks source link

fftw_threads symbols #13

Open colinjcotter opened 3 years ago

colinjcotter commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Yes, PETSc installs mpi4py_fft from source. It finds the FFTW libraries during setup, but trying to use mpi4py_fft then reports that stuff is missing.


From: Mikael Mortensen @.> Sent: 30 September 2021 14:37 To: mpi4py/mpi4py-fft @.> Cc: Cotter, Colin J @.>; Author @.> Subject: Re: [mpi4py/mpi4py-fft] fftw_threads symbols (#13)

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mpi4py/mpi4py-fft/issues/13#issuecomment-931330338, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOSV4WGG4FJI2UB4GTEO3TUERRYTANCNFSM5FB7K5YA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

colinjcotter commented 3 years ago

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.