opencl support for darktable

I’m building a new PC and the most power hungry task it’ll do is run darktable. It’ll be an AMD Ryzen 7, 3700x Linux box with pcie 4, plenty of ram, and a fast drive but I’m unsure what graphics card to get. I’m prepared to spend a bit of money here but I’m worried that I might get the wrong one and I won’t get opencl to play with darktable. Is there a manufacturer, chipset, model etc I should be going for, or avoiding? And if you have a card you’re happy with, please let me know!

Morning, @xyzzy,

What motherboard are you planning to use?
My present build is based on a Ryzen 9 3900X.
I picked an Nvidia gfx (a GTX-1660) for it and
it works quite well.

BUT, since the GTX-1660 is relatively new, all
Linux distros are not able to handle it properly.
So before selecting a distro, be sure to check
whether it can handle your card.

I am running Manjaro/KDE and openCL works
fine.

Have fun!
Claes in Lund, Sweden

2 Likes

Hi @Claes. I’m prepared to build this around the demands of darktable, really. Currently I’m considering the Gigabyte X570 GAMING X Motherboard ( full list: https://uk.pcpartpicker.com/list/GvYQf9 ), and I’ll be using Ubuntu 18.04 (and I guess 20.04 at some point later this year). I need to do a little more reading but I believe Ubuntu 18 is one of the distros which has good driver support for graphics cards and some of the new graphics stacks being developed. From what I’ve read, the nvidia cards have good (binary, proprietary) support and AMD cards have slower but better open source support.

My present mb is an X570 Aorus Pro, i.e. also a Gigabyte.
Yes, I use the proprietary driver(s) for the Nvidia.

What do you mean with “plenty of RAM”?
Flare-X with low CL go very well with that motherboard,
as well as some of the more modern Trident-Z-something.
Clockspeed and low CL = important

I have a table of clockings I have made for openCL and darktable
for Ryzen 1700X, 2700X, and 3900X using 2 x 8 gig, 4 x 8 gig, and
2 x 16 gig RAM. and using GTX-1050, and GTX-1660. Would you like a copy?

Addendum: I have just checked your parts list.
a) The RAM you picked has too high a CL value. Search for 3200MHz and CL=14.
b) Why do you buy a separate CPU cooler? Doesn’t the 3700X include a box cooler (which is good!)?
c) Also watch out for the power supply: does it have extra 12V outlets for the motherboard and/or a powerful gfx?

Have fun!
Claes in Lund, Sweden

1 Like

Changed spelling of DarkTable in the title to darktable as it always wants to be written in lowercase. :wink:

If you stay with the binary drivers shipped with your distro, you should check the package version and the changelog. Ubuntu 18.04 has nvidia driver 390 which is too old for a 1660 or so.

https://metadata.ftp-master.debian.org/changelogs//non-free/n/nvidia-graphics-drivers/nvidia-graphics-drivers_418.74-1_changelog

But I guess you will get newer versions for Ubuntu 18.04. Debian has a repository called backports the get newer versions of selected packages for the current stable release. I guess there is something similar for Ubuntu.

1 Like

The full spec I’m planning is here: https://uk.pcpartpicker.com/list/GvYQf9
32gigs of ram. Yes, if you have any timings handy that would be great! I’d rather get a slightly older card that I know is solid (specifically opencl support in darktable - I won’t be gaming) than the latest and greatest and have problems with linux, the motherboard etc.

Honestly OpenCL is one of more mindbogging problems in linux world. Generally with nvidia drivers you’ll get OpenCL 1.2 and there are no open source drivers for nvida (i think)
With AMD there are at least 3 ways to get OpenCL, one being ROCm and one AMDGPU pro and it kinda made me sad - I was about to buy RX 980 for opencl support but my CPU+motherboard+gpu combination wouldn’t work

With getting newest and beefiest options possible I’d recommend going full AMD since opencl seems to be high on their priority list :slight_smile:

1 Like

Sorry, just fixed my posts up accordingly - I was using the reddit darktable subreddit and that’s how they capitalise it: https://www.reddit.com/r/DarkTable/comments/ev88tn/whats_your_pc_spec/

Since we both were typing at the same time, I hope that
you did not miss my addendum above re your parts list???

So now we know where this spelling comes from :smiley:

I agree. I’m currently using the legacy NVidia driver on a card that’s meant to be in active support because the newer driver kept breaking halfway through an editing session. I still get issues occasionally but no idea how to resolve them (NVidia support site tried their best but said they couldn’t reproduce).

So, to sum up: Nvidia, fast but not too new (since Debian and Debian based distros do not have the newest driver in the repo).

@xyzzy Here are my actual clockings for the darktable Benchmark (with and without openCL), using darktable and Nvidia:

2 Likes

Hi;

my two bits worth: I also have a GTX 1660, plugged into a Gigabyte A320-HD2 motherboard. I’ve recently updated from an A12 APU to a Ryzen-7 2700x. I’ve been running Ubuntu for some years now, and OpenCL has always been what I have been looking for in darktable performance. I run KDE (Plasma) desktop.

I found no problem with OpenCL with Ubuntu out of the box with the GTX 1660.
My uname details:

4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

1 Like

Also - once subreddit has it’s name it can’t be changed: https://www.reddit.com/r/ModSupport/comments/3cglol/what_are_some_small_problems_with_moderation_that/csvcbaz/?context=1 I mean - technically it should be possible to change name due to trademark concerns etc, so… official mail form darktable stakeholders and /r/darktable mods should be enough to move some admins to do DB change required.

Regarding OpenCL - honestly it should be easier but with nvidia’s pushing CUDA I think in near future it’s AMD that will be recommended more and more since Ryzen cpu + ROCm compatible GPU will have best OpenCL support possible :slight_smile:

This is what I was thinking: if you’re on Linux, best to get an AMD card supported by rocm?

@Claes Thanks, yes I noticed and will investigate this evening. And thanks for the clockings table! I’m considering that cooler because I’ve read that the stock one is noisy and not that cool either. Update: looking around a bit, perhaps the stock cooler is more than adequate for me requirements given that I won’t be overclocking. I can’t find affordable CL=14 ram and I’m not sure how much difference it makes. I suspect I’ll get a better, faster system spending the difference on a more powerful graphics card with more memory? I’ll checkout the PSU regarding power outlets.

@johnny-bit What’s your mobo/card/cpu combination and are you happy with the performance? Whatever card (plus mobo plus cpu) has to work today - I don’t want to hope that whatever card I get might work with opencl in the future!

@betazoid I don’t mind getting proprietary drivers that aren’t in the repo if that’s the only/best solution. (Ideally I’d get an AMD because I appreciate they’re a lot better than nvdia in FOSS terms, but I want this somewhat expensive PC i’m planning to actually work for the purpose intended!)

@elstoc Which card is this which doesn’t work? Does an older driver work reliably on it?

Are there any models I should be avoid because they just don’t work and won’t be fixed?

There are benchmarks for ROCm and darktable here:

https://www.phoronix.com/scan.php?page=article&item=rocm-20-linux50&num=3

and here are some more numbers for opencl and different setups:
https://math.dartmouth.edu/~sarunas/darktable_bench.html

I would be carefull about what near future means with AMD.
Today it is really hard to recommend which route to take - AMD or Nvidia?

I’ve a GTX 1060 and looking at benchmarks of current GPUs the entry price for a card which beats a 1060 is not really high.

Thanks for that first link - I saw a 3 year old article specifically about darktable but didn’t get around to searching the site for more recent articles.

Whatever card I get has to work well today. I don’t mind staying on Ubuntu 18, using old drivers etc as long as darktable is fast and stable. Perhaps i’m over worrying about it but I know how flaky these things can be and I lack the optimism that I’ll report problems to amd/nvidia/msi/darktable devs and people will stop what they’re doing and fix them, so I can’t imagine buying a card which is not currently working well.

This is on a 2Gb GeForce GTX 770. The issue I had was that if I opened darktable and started editing, stopped for 20 seconds or so, then started again, the driver reported an error and darktable fell back to cpu. I still get errors occasionally on the older (340xx-series) driver but much less frequently - perhaps every day or two, and then it usually takes two or three restarts of darktable before the error stops.

Edit: Full disclosure - I don’t use my NVidia card for graphics, just for OpenCL. I use my onboard intel card for graphics because I just had too many issues with the NVidia one. However, the fact that it works fine on an older driver suggests that my issues probably aren’t related to this.