geggo / gpyfft

python wrapper for the OpenCL FFT library clFFT
GNU Lesser General Public License v3.0
54 stars 21 forks source link

can't find libclFFT.so.2 #13

Closed ZacDiggum closed 9 years ago

ZacDiggum commented 9 years ago

Hi there,

I'm on Linux Mint 17.2 with fglrx as OpenCL platform. I installed gpyfft using prebuilt binaries from https://github.com/clMathLibraries/clFFT/releases. Gpyfft wouldn't find libclFFT.so.2. So I created a file called libclFFT.so.2.conf in ld.so.conf.d with the proper path to libclFFT.so.2. That did the trick when installing pyopencl_blas. Still won't work... Anyone willing to help a newbie?

geggo commented 9 years ago

Am 09.07.2015 um 16:26 schrieb ZacDiggum notifications@github.com:

Hi there,

I'm on Linux Mint 17.2 with fglrx as OpenCL platform. I installed gpyfft using prebuilt binaries from https://github.com/clMathLibraries/clFFT/releases https://github.com/clMathLibraries/clFFT/releases. Gpyfft wouldn't find libclFFT.so.2. So I created a file called libclFFT.so.2.conf in ld.so.conf.d with the proper path to libclFFT.so.2. That did the trick when installing pyopencl_blas. Still won't work... Anyone willing to help a newbie?

Have no idea about the intricacies of path handling, just 2 observations:

Gregor

— Reply to this email directly or view it on GitHub https://github.com/geggo/gpyfft/issues/13.

ZacDiggum commented 9 years ago

Hi, thanks for your help. I just put the library in /usr/local/lib. Not very elegant, but it works. BTW, gpyfft gives me a speedup of about one third over Reikna, when operating on large arrays (like 4k x 4k). I'll close the issue.

yves-surrel commented 3 years ago

Hi

Same problem here on Ubuntu 20.04

Compiled successfully clFFT and got libclFFT.so.2 in /usr/local/lib64, which is the directory indicated in setup.py under the section 'linux':

CLFFT_LIB_DIRS = [r'/usr/local/lib64']

Ran python setup.py build and python setup.py install in gpyfft master directory (with no error apparently), and import gpyfft in python complains about not finding licclFFT.so.2.

Any idea? Why the line CLFFT_LIB_DIRS = [r'/usr/local/lib64']is not taken into account ?

yves-surrel commented 3 years ago

Also tried to copy the clFFT lib in the ..../site-packages/gpyfft directory, along with gpyfftlib.cpython-38-x86_64-linux-gnu.so, without success.

geggo commented 3 years ago

I also encountered this kind of problem. By default, clFFT gets installed to /usr/local/lib64. But, this location is not contained in the library search path on ubuntu, which expects it to be in /usr/local/lib/x86_64-linux-gnu. You can just manually copy the clFFT libs to this location.

Another option is to permanently add /usr/local/lib64 to the library search path:

echo "/usr/local/lib64" > usr_local_lib64.conf sudo mv usr_local_lib64.conf /etc/ld.so.conf.d sudo ldconfig