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

ImportError: DLL load failed #45

Open
yves-surrel opened this issue Jan 18, 2020 · 15 comments
Open

ImportError: DLL load failed #45

yves-surrel opened this issue Jan 18, 2020 · 15 comments

Comments

@yves-surrel
Copy link

Hi
I managed (painfully) to have

pip install .

compile the whole thing without error, on Windows 10 with the latest Microsoft Build Tools. But importing gpyfft in python 3.7.6 raises the following error:

import gpyfft
Traceback (most recent call last):

  File "<ipython-input-2-3687f3cada1c>", line 1, in <module>
    import gpyfft

  File "C:\Users\Yves\Anaconda3\lib\site-packages\gpyfft\__init__.py", line 6, in <module>
    from .gpyfftlib import GpyFFT, GpyFFT_Error, Plan

ImportError: DLL load failed: La procédure spécifiée est introuvable.

(the specified procedure could not be found). Any idea of what could be happening?

@geggo
Copy link
Owner

geggo commented Jan 20, 2020

I have gpyfft compiled and running on Windows with Anaconda Python 3.x, typically via
python setup.py build
python setup.py install

It could be you have an older version of the clfft library or is found somewhere else on the path. You could try to use DependencyWalker to check for which libraries are actually loaded.

Gregor

@yves-surrel
Copy link
Author

yves-surrel commented Jan 20, 2020 via email

@geggo
Copy link
Owner

geggo commented Jan 20, 2020

Hi Yves,

fftw is optional for building clfft, it is only needed for validating results in tests. Building clFFT should gracefully proceed without fftw installed.
Did you try using DependencyWalker?

@yves-surrel
Copy link
Author

yves-surrel commented Jan 22, 2020 via email

@geggo
Copy link
Owner

geggo commented Jan 22, 2020

somewhere in your gpyfft module directory should be a gpyfftlib.XXX file, with the ending depending on your platform. Actually, it is dll file which you can analyze with DependencyWalker. It is linked to clFFT.dll, which needs to be found, i.e., it should be placed in the same folder as gpyfftlib or be found on the search path.
Possibly, clFFT.dll (and also statTimer.dll) is not found, or an incompatible version.

hope that helps
Gregor

@yves-surrel
Copy link
Author

yves-surrel commented Feb 5, 2020 via email

@yves-surrel
Copy link
Author

yves-surrel commented Feb 5, 2020 via email

@yves-surrel
Copy link
Author

yves-surrel commented Feb 5, 2020 via email

@yves-surrel
Copy link
Author

yves-surrel commented Feb 5, 2020 via email

@geggo
Copy link
Owner

geggo commented Feb 5, 2020

Hi Yves,

actually Anaconda Python 3.7 on MacOS is my primary development platform. I just pushed my local changes, including some modifications of setup.py to github. Perhaps this fixes your segfaults.
Otherwise I would recommend making a clean rebuild of gpyfft, and search for stale gpyfftlib*.so files, I remember this might cause troubles.
hopes that helps
Gregor

@yves-surrel
Copy link
Author

yves-surrel commented Feb 5, 2020 via email

@geggo
Copy link
Owner

geggo commented Feb 5, 2020

Hi Yves,

I added a zipped wheel file of my recently built gpyfft, for Anaconda Python 3.7. Try using this, install it with
pip install

gpyfft.zip

If it crashes, try to figure where. Which version of clFFT are you actually using (you could check it with

otool -L gpyfftlib-XXX.so

Gregor

@yves-surrel
Copy link
Author

yves-surrel commented Feb 5, 2020 via email

@geggo
Copy link
Owner

geggo commented Feb 6, 2020

Hi Yves,

it seems you have clfft not installed, the library (libclFFT.dylib) is not on your search path and cannot be found.

I typically build and install clFFT by cloning latest version from github, and then

cd src
cmake -G "Unix Makefiles"
make
sudo make install

gpyfft is just a wrapper around the clFFT library and relies that it is properly installed. I do not have the resources to provide binaries for all the major platforms

Gregor

@yves-surrel
Copy link
Author

yves-surrel commented Feb 6, 2020 via email

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