Closed JtheBAB closed 2 months ago
Hello,
I suppose that you have a GPU and want to enable OpenCL acceleration? If not you can pass -DENABLE_GPU=0
to cmake and it will not include the parts that requires cl.h
.
It would be strange if opencl-headers
(or similarly named) is not available to RHEL. I can see that it exists at least for RHEL8.
I attached a DEB file generated on Ubuntu 24.04 but I am afraid that it isn't portable and that deconwolf has to be built against the correct glibc version. If you let me know what RHEL version that you have I can try to build a deb file for it.
Cheers, Erik
Also check that OpenCL is installed for the GPU first, clinfo
should tell you if it is.
The only opencl that i can find is opencl-filesystem. And it doesn't seam to help.
The system where i build is without a GPU. But Cuda is available. It builds when i disable use the -DENABLE_GPU=0.
But even on a machine with NVIDIA GPU i get:
-- The C compiler identification is GNU 11.4.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Build type: Release -- The CXX compiler identification is GNU 11.4.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done Enabling IPO -- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3") -- Found FFTW: /usr/include found components: FLOAT_LIB FLOAT_OPENMP_LIB -- Found TIFF: /usr/lib64/libtiff.so (found version "4.4.0") -- Found GSL: /usr/include (found version "2.6") -- Looking for CL_VERSION_3_0 -- Looking for CL_VERSION_3_0 - found -- Found OpenCL: /usr/lib64/libOpenCL.so (found version "3.0") Will use OpenCL -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") Found OpenMP Enabling IPO -- Configuring done (1.7s) -- Generating done (0.0s)
Then cpack -G RPM
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: deconwolf
CPack Error: Problem running install command: /usr/bin/cmake --build . --target "preinstall"
Please check /root/deconwolf-0.4.2/builddir/_CPack_Packages/Linux/RPM/PreinstallOutput.log for errors
CPack Error: Error when generating package: deconwolf
[root@bioc-ws01 builddir]# /usr/bin/cmake --build . --target "preinstall"
[ 2%] Building C object CMakeFiles/dw.dir/src/deconwolf.c.o
In file included from /root/deconwolf-0.4.2/src/method_shb_cl.h:20,
from /root/deconwolf-0.4.2/src/dw.h:318,
from /root/deconwolf-0.4.2/src/deconwolf.c:21:
/root/deconwolf-0.4.2/src/cl_util.h:27:10: fatal error: CL/cl.h: No such file or directory
27 | #include <CL/cl.h>
| ^~~~~
compilation terminated.
gmake[2]: [CMakeFiles/dw.dir/build.make:76: CMakeFiles/dw.dir/src/deconwolf.c.o] Error 1
gmake[1]: [CMakeFiles/Makefile2:85: CMakeFiles/dw.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
clinfo gives the output of the GPU
Best wishes
Hi again,
I've updated the CMakeLists.txt
by adding the line
target_include_directories(dw PRIVATE ${OpenCL_INCLUDE_DIRS})
it was a mistake from my side not to have it from the beginning. On my system it was not needed since OpenCL was installed in a standard directory, i.e.
$ pkg-config OpenCL --cflags
$ pkg-config OpenCL --libs
-lOpenCL
Hopefully the change solves the issues on your machine with the Nvidia card. However, both the shared object libOpenCL.so
and the header file(s) cl.h
have to exist somewhere on the system.
If it still does not work because of missing CL/cl.h
it is possible to copy the CL
folder from somewhere else as suggested here.
Let me know if this solves the issue!
Cheers, Erik
Closing this issue since I think that it is solved and there is no activity.
Hi
I try to build it for RHEL systems.
But i get this:
CPack Error: Error when generating package: deconwolf [root@itlegacytest builddir]# less /root/deconwolf-0.4.2/builddir/_CPack_Packages/Linux/RPM/PreinstallOutput.log [root@itlegacytest builddir]# /usr/bin/cmake --build . --target "preinstall" [ 2%] Building C object CMakeFiles/dw.dir/src/deconwolf.c.o In file included from /root/deconwolf-0.4.2/src/method_shb_cl.h:20, from /root/deconwolf-0.4.2/src/dw.h:318, from /root/deconwolf-0.4.2/src/deconwolf.c:21: /root/deconwolf-0.4.2/src/cl_util.h:27:10: fatal error: CL/cl.h: No such file or directory
include <CL/cl.h>
compilation terminated.
According to my search this is due to a missing opencl-headers package. But that package doesn't exists on RHEL systems. Can you build a RPM package? Or tell me how to build it on a RHEL system?
Best wishes