Conversation
During the initial CMake configuration for this project, the OpenCL header would be detected, but the proper configuration would not be set for the build. This caused a failed attempt to build /stencils/3axis_cl.cpp because CL/opencl.hpp could not be found. This is resolved when CUDA is installed. When CMake detects the CUDA compiler and headers, the correct environment is set for OpenCL as well. A change was made to only attempt detection of OpenCL when CUDA was found. This is likely a problem with the OpenCL detection within CMake and optimally would be fixed in that package. Combined with the fact that bricklib OpenCL currently only works with CUDA, the best place to make this fix was within this library.
|
This was discovered via Spack on the UofU CHPC cluster. Seems the OpenCL headers can be found under the general include directories. This is a bad configuration for the CHPC IMO, but this fix will work even with bad configurations. |
|
This is not the right fix. OpenCL is more useful for Intel platforms than NVIDIA ones. This will break Intel-only platforms. What is the opencl compiler that CHPC uses? It does seems strange that both compiler/header is available and CMake report that it cannot be found.
I suspect that for build + install it does not need to compile the examples, better if we just gate the examples with |
|
It also possible that find OpenCL only returns if the c headers are found. We could check for |
During the initial CMake configuration for this project, the OpenCL header would be detected, but the proper configuration would not be set for the build. This caused a failed attempt to build /stencils/3axis_cl.cpp because CL/opencl.hpp could not be found.
This is resolved when CUDA is installed. When CMake detects the CUDA compiler and headers, the correct environment is set for OpenCL as well. A change was made to only attempt detection of OpenCL when CUDA was found.
This is likely a problem with the OpenCL detection within CMake and optimally would be fixed in that package. Combined with the fact that bricklib OpenCL currently only works with CUDA, the best place to make this fix was within this library.