The absence of libOpenCL.so is not the problem, as you have libOpenCL.so.1, as darktable-cltest tells you:
"0.0161 [opencl_init] opencl library libOpenCL.so.1 found on your system and loaded, preference ‘default path’ "
(my system doesn’t have libOpenCL.so and darktable works with openCL). Darktable links to this library, and won’t compile openCL support without it.
Then there is the issue of having all the bits needed byopenCL needs at a lower level. You do not need all the parts of the driver to compile darktable, but you will need them for any program using openCL.
Darktable compilation will not warn you when anything at that level is missing
Darktable_cltest does tell you there is a problem at that level:
“0.0200 [opencl_init] 0 platforms detected, error: unknown OpenCL error”.
What the exact issue is, is impossible to tell from here, as we can’t see which packages you actually have installed (name and version, make sure versions match, and that when there is an upgrade, you upgrade all packages to the same version number)
As problems happens after a sleep/resume, and reloading the nvidia driver gets openCL working again, it looks like there’s a problem at the driver level, where the hardware isn’t restarted properly on resume (unfortunately not all that uncommon under linux).