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.

Does anyone have any ideas about the cause/solution for this?

I have the same issue with the same error in cltest. What exactly does this error message mean:
The specified procedure could not be found.

I always have to edit the kernel #includes to give a path, eg:
from #include "common.h"
to #include "..\share\darktable\kernels\common.h"
But this obviously doesn’t solve the issue in this case…

Like I said, i built it myself and it worked fine .

Never had a real ‘cause’ or something, and I made a ticket on GitHub by no real answers there.

Yeah cheers. I used to build it back when it was 2.70… Don’t really want to start again as I just spend all my time coding rather than shooting. lol

It’d be nice to have this working as just a normal user… :wink:

Can’t help you then. It appears to be something in the bundling . The moment I had a build going (which was easy and just following the steps, and didn’t conflict with my visual studio work ) i believe the supplied builds started working .

Since I known had a working build of my own, I didn’t went back and just do a ‘git pull’ followed by a rebuild every now and then.

As a complete shot in the dark, you might try installing in something that resembles /opt/darktable. Maybe I path gets hardcoded somewhere.

Or ask on the ticket I made : https://github.com/darktable-org/darktable/issues/10007

Or make your own .

Success

Yeah, maybe a good idea if I get desperate… I could install it in msys :slight_smile: I may just go back to building it again at some point. It’d be nice if someone could point us to a cause/fix for this though… I mean, maintaining a build environment isn’t everyone’s cup of tea :wink:

So if I change the dll name then I get the same error but with the new name… So it’s not the dll that can’t be found… Seems it’s a procedure pointed to by the dll that can’t be found :wink: