lut3d missing under Windows with OpenCL enabled, nvidia gtx1060

Downloaded the latest ‘insider build’ on Windows from the forum here, darktable-3.7.0+977_gcf99bbb0e-win64.

And lut3d is missing.

The thing is, the exact same build installed on another computer works fine.

Both machines have OpenCL enabled and working, but the non-working system shows this when running cltest:

...
2.883623 [opencl_create_kernel] successfully loaded kernel `warp_kernel' (223) for device 0
2.888319 [opencl_create_kernel] successfully loaded kernel `lowlight' (224) for device 0
2.893794 [opencl_create_kernel] successfully loaded kernel `lowpass_mix' (225) for device 0
[iop_load_module] failed to open `lut3d': 'C:\Program Files\darktable\lib\darktable/plugins\liblut3d.dll': The specified procedure could not be found.
2.910136 [opencl_create_kernel] successfully loaded kernel `monochrome_filter' (226) for device 0
2.914281 [opencl_create_kernel] successfully loaded kernel `monochrome' (227) for device 0
2.919428 [opencl_create_kernel] successfully loaded kernel `negadoctor' (228) for device 0
...

So, I’m guessing the working system has a dependency (dll) somewhere in the path that causes it to work, or my non-working system has another version of a dependency that gets picked over the supplied darktable-ones…

That last one doesn’t make sense, it will always try DLLs in the executable folder first…

I removed the Darktable folder from %localappdata% and removed the folders from the Program Files install-path to really start clear, but still…

how can I found out what’s causing this?

The path to lud3d in the log is wrong. Perhaps that’s it.

But where could that be configured? If it’s in the build, then the problem should be on any PC and it works fine on one.

try clearing your cache directory and see if that clears it.

I already cleared %localappdata%\darktable (Where the config and database resides).

I already cleared the weird place where OpenCL kernels are cached under Windows (%localappdata%\microsoft\windows\inetcache\darktable).

In my ‘home folder’ there is a .cache, but there is only a fontconfig folder inside. I also have a ~/.config but there is nothing darktable related in there.

Is there another cache folder I’m missing then?

Update, it does appear to be OpenCL related. When I start darktable with --disable-opencl the module appears.

4.445760 [opencl_build_program] saving binary
4.450214 [opencl_init] compiling program 'lut3d.cl' ..
4.452763 [opencl_fopen_stat] could not open file 'C:\Users\Joris\AppData\Local\Microsoft\Windows\INetCache\darktable\cached_kernels_for_NVIDIAGeForceGTX10606GB_47141\lut3d.cl.bin.d825bf18fc6d155e2d0c0c2548c7b6f4'!
4.463806 [opencl_load_program] could not load cached binary program, trying to compile source
4.468382 [opencl_load_program] successfully loaded program from 'c:\Program Files\darktable\share\darktable\kernels\lut3d.cl' MD5: 'd825bf18fc6d155e2d0c0c2548c7b6f4'
4.483150 [opencl_build_program] successfully built program
4.485924 [opencl_build_program] BUILD STATUS: 0
4.488493 BUILD LOG:
4.489773

Compiling kernel seems fine (running cltest multiple times neatly shows that the cached binary has been loaded instead of compiling a new one).

5.293476 [opencl_init] OpenCL successfully initialized.
5.296409 [opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
5.301598 [opencl_init]          0       'NVIDIA GeForce GTX 1060 6GB'
5.305180 [opencl_init] FINALLY: opencl is AVAILABLE on this system.
5.308703 [opencl_init] initial status of opencl enabled flag is ON.

OpenCL seems to be enabled.

But later, it gives (like posted before)

.685666 [opencl_create_kernel] successfully loaded kernel `lowlight' (224) for device 0
6.690722 [opencl_create_kernel] successfully loaded kernel `lowpass_mix' (225) for device 0
[iop_load_module] failed to open `lut3d': 'c:\Program Files\darktable\lib\darktable/plugins\liblut3d.dll': The specified procedure could not be found.
6.707476 [opencl_create_kernel] successfully loaded kernel `monochrome_filter' (226) for device 0
6.711715 [opencl_create_kernel] successfully loaded kernel `monochrome' (227) for device 0
6.717514 [opencl_create_kernel] successfully loaded kernel `negadoctor' (228) for device 0

So it seems my driver install has a missing entrypoint or something? The opencl-kernel uses a function that is not available on my system?

Or are there known issues with recent (Windows) Nvidia drivers?

There was a problem with the nvidia drivers, a couple of months ago, that cause compilation problems with the darktable opencl modules. I believe that it’s fixed in the latest nvidia drivers.

Cleaned all drivers (they weren’t that old), re-installed the latest ones available.
Still no luck.

Maybe the opencl implementation for the generation of my card just hasn’t got the latest opencl-compatibility or something?

Am I the only one (still) using a pascal card around here?

Where i can download this version darktable, thank you!

There are topics here in the forum called something like ‘windows insider’ or ‘insider build’ or something, with a date. Every week or few weeks there is a new one.

Building it yourself is quite straight forward btw, eveh from scratch.

thank you!

To the original problem of the thread:

I created an issue on github about this, but that resulted in no real solutions.

The only thing that ended up from it was somebody with a gtx1050 reporting that it did work for him/her, on their own build.

So I tried compiling darktable myself finally, went without any issue at all and behold : Nvidia lut3d module working as it should.

But only from the msys2 shell.
I tried looking at different environment variables that are set in msys2 but not in plain windows, but didn’t come far.

In the end closest the cmd window, opened it again, tried again and now it suddenly works??

It appears installing msys2 and or building DT myself fixed my issue, even from the windows cmd prompt. So there is a dependency installed or an environment variable set that is otherwise not the case.

Anyway, it’s working now and I can now build my own DT.