-
Notifications
You must be signed in to change notification settings - Fork 21
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
Complains about _clfftBakePlan not found when importing #52
Comments
How did you install the clfft libs?
… Am 21.04.2021 um 11:26 schrieb yves-surrel ***@***.***>:
Trying to install gpyfft on a new Mac Mini M1.
Successfully built and compiled sources
python setup.py build
python setup.py install
with no errors.
When importing in python, I get:
In [1]: import gpyfft
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-3687f3cada1c> in <module>
----> 1 import gpyfft
~/Downloads/gpyfft-master/gpyfft/__init__.py in <module>
4
5 from .version import __version__
----> 6 from .gpyfftlib import GpyFFT, GpyFFT_Error, Plan
7 from .fft import *
ImportError: dlopen(/Users/wyselight/Downloads/gpyfft-master/gpyfft/gpyfftlib.cpython-38-darwin.so, 2): Symbol not found: _clfftBakePlan
Referenced from: /Users/wyselight/Downloads/gpyfft-master/gpyfft/gpyfftlib.cpython-38-darwin.so
Expected in: flat namespace
in /Users/wyselight/Downloads/gpyfft-master/gpyfft/gpyfftlib.cpython-38-darwin.so
Any idea ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#52>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHMNM77XKPJYAGDJ5R5XP3TJ2K6FANCNFSM43J63AFA>.
|
Hi Gregor
I followed the method you indicated in a previous e-mail to me:
"
I typically build and install clFFT by cloning latest version from github, and then
cd src
cmake -G "Unix Makefiles"
make
sudo make install
"
and everything has run fine (in terms of how it compiles)!
Yves
… Le 21 avr. 2021 à 16:34, Gregor Thalhammer ***@***.***> a écrit :
How did you install the clfft libs?
> Am 21.04.2021 um 11:26 schrieb yves-surrel ***@***.***>:
>
>
> Trying to install gpyfft on a new Mac Mini M1.
>
> Successfully built and compiled sources
>
> python setup.py build
> python setup.py install
> with no errors.
>
> When importing in python, I get:
>
> In [1]: import gpyfft
> ---------------------------------------------------------------------------
> ImportError Traceback (most recent call last)
> <ipython-input-1-3687f3cada1c> in <module>
> ----> 1 import gpyfft
>
> ~/Downloads/gpyfft-master/gpyfft/__init__.py in <module>
> 4
> 5 from .version import __version__
> ----> 6 from .gpyfftlib import GpyFFT, GpyFFT_Error, Plan
> 7 from .fft import *
>
> ImportError: dlopen(/Users/wyselight/Downloads/gpyfft-master/gpyfft/gpyfftlib.cpython-38-darwin.so, 2): Symbol not found: _clfftBakePlan
> Referenced from: /Users/wyselight/Downloads/gpyfft-master/gpyfft/gpyfftlib.cpython-38-darwin.so
> Expected in: flat namespace
> in /Users/wyselight/Downloads/gpyfft-master/gpyfft/gpyfftlib.cpython-38-darwin.so
> Any idea ?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub <#52>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHMNM77XKPJYAGDJ5R5XP3TJ2K6FANCNFSM43J63AFA>.
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#52 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFQM3HGEESO6MMFQLPCBWDTTJ3O6ZANCNFSM43J63AFA>.
|
The error message "Symbol not found: _clfftBakePlan" indicates that the the clFFT library cannot be linked to when importing the wrapper. You could try 'otool -L gpyfftlib.cpython-38-darwin.so' to check to which libraries the wrapper is linked, and check if they are properly installed. I don't know how the switch to a new architecture is handled, try checking, e.g. via 'otool -hv yourlib.so' for which architecture the gpyfft and clFFT libs have been built. hope that helps |
You were right, the clFFT library was not linked. I retried everything from the very beginning, and after more careful examination, I noticed the following when building gpyfft:
So the problem may come from the new hardware the Mac Mini M1 is running on, and it seems that some architecture flags are not the same for clFFT and gpyFFT. What do you think? |
Indeed, that explains the failure. It seems the python your are using for building the gpyfft wrapper uses the x86_64 architecture emulation. I read that native python (with numpy!) is available (anaconda with conda-forge channel) In case you succeed I am interested in the performance, could you please post the result of running
|
Good news ! I succeeded in installing gpyfft, but I went the other way round, i.e. forcing clFFT to be compiled to the x86_64 arch instead of installing a native python (I fear to have other problems with the numerous libraries I am using). So, after some googling around, I did in the clFFT-master directory:
Here is the benchmark for the OpenCL device 1 (GPU) (using device 0 raises an INVALID_WORKGROUP_SIZE error, well known for Macs, I think):
For reference, here is the benchmark on my MBP 15" 2017, on the 'AMD Radeon Pro 555 Compute Engine' openCL device
So it seems not too bad with this new Mac Mini M1 ;-) |
Excellent! |
FYI: you can get arm64 native clFFT from homebrew. I've been using the python sub variant of CLIJ2-clFFT by @bnorthan |
Trying to install gpyfft on a new Mac Mini M1.
Successfully built and compiled sources
with no errors.
When importing in python, I get:
Any idea ?
The text was updated successfully, but these errors were encountered: