Page 4 of 7

Re: MacOS GPU

Posted: Sun Mar 22, 2020 4:14 pm
by Joe_H
Which GPU's do those run on? The usable ones for F@h need to support OpenCL 1.2 or greater, and support double precision arithmetic.

The ones installed in laptops can be a problem. Unless the system is locked to using the supported GPU, any time the video is switched to using the iGPU on the Intel processor, folding will crash. There is also the problem with heat dissipation.

Re: MacOS GPU

Posted: Sun Mar 22, 2020 11:28 pm
by SteveW928
rromanchuk wrote:I want to give a little push back on this thread in 2020, just so newcomers have some context.

Every major (even smaller private projects) science project on boinc that offers GPU applications, also support native macos AMD and Nvidia GPUs builds, right out of the box. The only exception being GPUGRID.

amd/nvidia opencl binaries have been running successfully on macos, since at least 2017.
It is probably more just a lack of (vocal) demand, and that too many Macs have fairly wimpy GPUs (of course, so do most PCs). I suppose a lot of these projects end up being based off 'low hanging fruit.' They can probably get many times the outcome by just getting a news article in the right place, or something like what has happened with this COVID-19 response, than making improvements to the client (especially ones for broader support that might be relatively small).

So, while I really want Mac GPU support, I guess I understand why it hasn't happened yet. I have to wonder though, if like some other areas, the Mac community is being undervalued. While the sheer percentage might be smaller, I think it is more involved. We see this in things like ecommerce/consumer-spending, for example.

Re: MacOS GPU

Posted: Sun Mar 22, 2020 11:32 pm
by SteveW928
Joe_H wrote:... Unless the system is locked to using the supported GPU, any time the video is switched to using the iGPU on the Intel processor, folding will crash. There is also the problem with heat dissipation.
Good points. I would suppose the situation with dual GPUs (internal on the CPU vs dedicated) could be coded around? But, heat dissipation would be an issue. However, isn't it an issue for EVERY platform? The end-user needs to be aware of their particular situation... and there could absolutely be more education around that factor with these projects.

Re: MacOS GPU

Posted: Mon Mar 23, 2020 2:45 am
by DanGe
Heat dissipation might be a bigger issue with MacBook Pros. Not because the computer will throttle or melt, but because the whole aluminum unibody might get pretty uncomfortable to use if it's folding the whole day. So probably the best target audience would be those with eGPUs, high end iMacs, or Mac Pros.

I hate to be a downer for my own platform, but it is what it is. As I stare longingly at my switched off Vega 56...

Re: MacOS GPU

Posted: Mon Mar 23, 2020 3:05 am
by bruce
I don't have much hope that your pushback will be successful but don't let me stop you. I'd love to have a developer work out the problems associated with dGPUs on OS-X. I can absolutely nothing will happen while everybody is frantically trying to add enough servers and enough COVID WUs to satisfy the current demand As fast as we add more servers, the demand goes up, too.

Re: MacOS GPU

Posted: Mon Mar 23, 2020 3:13 am
by SteveW928
DanGe wrote:Heat dissipation might be a bigger issue with MacBook Pros. Not because the computer will throttle or melt, but because the whole aluminum unibody might get pretty uncomfortable to use if it's folding the whole day. So probably the best target audience would be those with eGPUs, high end iMacs, or Mac Pros.

I hate to be a downer for my own platform, but it is what it is. As I stare longingly at my switched off Vega 56...
Yeah, whether or not it would actually break it, there are the practical aspects. But, that issue is the case with CPU folding too. I'm pretty sure I damaged a couple MBPs during the 2000s folding with them (and running large rendering jobs with them). Apple's laptops have always had a bit of a cooling problem if you just run them full out w/o thinking of that and taking precautions, as far as I can see.

That said, at least with CPU folding, you can set stuff properly to stay more in reasonable range. I have my Mac mini (2018) setup to use about 1/3 of it's CPU folding potential, with Turbo Boost turned off on the i7. That keeps it running at a point where the fans run a bit, but it isn't too audible. My eGPU is a Blackmagic, so its designed to be run full-out for extended periods. I sure wish I could use it to fold on the Mac side! (I use it when in Windows, and it can crunch 100% 24/7 and the temps don't even get above mid-50s. I wish my Mac mini was designed like that!)

I agree the target audience for Mac folding (GPU-wise anyway) would be the non-laptop pro models and eGPU people. I think that latter category is the key, as any modern Mac user that got into folding could add one or more eGPUs (including laptop owners!) and then be in control over performance/cost/heat depending on their choice and budget.

Re: MacOS GPU

Posted: Mon Mar 23, 2020 3:16 am
by SteveW928
bruce wrote:... I can absolutely nothing will happen while everybody is frantically trying to add enough servers and enough COVID WUs to satisfy the current demand As fast as we add more servers, the demand goes up, too.
We're just offering to make that problem BIGGER. :lol:

Re: MacOS GPU

Posted: Mon Mar 23, 2020 5:36 am
by DanGe
Let this thread stand that there are dozens of us who are interested in MacOS GPU folding.

All right, I'm done with memeing now. Hopefully we'll revisit this once the current fires are put out.

Re: MacOS GPU

Posted: Tue Mar 24, 2020 6:01 pm
by diacritical
I've got a couple of Radeon Pro Vega IIs that are not doing anything most nights and weekends that I would love to put to work. That's 56 teraflops that could be put to good use with METAL support on OSX.

Here's hoping for the best. Wish I'd learned how to code...

Re: MacOS GPU

Posted: Wed Mar 25, 2020 5:52 am
by petery
I'm sure it takes quite a lot to try and implement a new usable system that doesn't break anything and works as intended, also their priorities are probably with trying to handle new load and make things as they are, more efficient. When I started folding this month, I installed it on everything, until I got to my 2012 mbp, which does have a dGPU from Nvidia, a 650M. I tried it, but when it wanted to run only while plugged in, that threw me a red flag, that this was a bad idea. Even if I do just CPU folding, I shudder to think of the damage the heat would do to my laptop.

All in all, I've installed it to my pc, 3x 5,1 cMP towers, 2010 27in iMac, and 2013 21in iMac. Again with the iMac's, I had to rethink how much I'd want to use those, and settled on using it on Medium. iMacs and mbps are fragile things, simple dust messes with the butterfly switches. I've watched enough of Louis Rossmann's MacBook repair yt channel to know that they break easily. Do you really want to put your $1k+ iMac through heat torture? With the eGPU route, you could just as easily drop the price of Apple Care into a simple desktop that can utilize one.

I believe the best option for Mac users that would like to use GPU folding, is to install windows. The time it takes for a few dozen of us to install windows and switch back through bootcamp as needed, would probably vastly be less than the time it takes to program for a new system. If anyone's interested in what my cMP towers are:

1: 2x 3.46 6core, cpu folding only on macOS (I love seeing cpu:24 under Description)
2: 2x 3.33 6core, running windows with 2x AMD rx580 8gb inside
3: 2x 2.66 4core, cpu folding only on macOS

I leave one on macOS for use by my parents, been trying to install windows on the other, but I'm rusty with these things, and bootcamp + Mojave + 5,1 doesn't seem to want to work

p.s. #1 cMP just started a WU, temps are holding at 80c and 71 for the CPUs, but it sounds like an airplane taking off. Honestly, it's just a sacrifice of convenience to have to bootcamp windows to run an eGPU or use cards in a tower, perhaps stay in macOS during the day, switch the windows for overnight. Do what you can, that's the whole point right?

Re: MacOS GPU

Posted: Wed Mar 25, 2020 1:50 pm
by jjrscott
I don't know if this is the correct place but here goes ...

By performing the following actions I was successful in getting FAHClient to recognise OpenCL:

Code: Select all

ln -s /System/Library/Frameworks/OpenCL.framework/OpenCL /usr/local/lib/libOpenCL.dylib
When I run the client I now get this:

Code: Select all

13:48:01:OpenCL Device 1: Platform:0 Device:1 Bus:NA Slot:NA Compute:1.2 Driver:1.2
13:48:01:OpenCL Device 2: Platform:0 Device:2 Bus:NA Slot:NA Compute:1.2 Driver:1.2
...
13:48:01:Enabled folding slot 01: PAUSED gpu:0:Baffin XT [Radeon RX 460] (waiting for idle)
13:48:01:ERROR:No compute devices matched GPU #0 AMD:5 Baffin XT [Radeon RX 460].  You may need to update your graphics drivers.
Does anyone know how to get past this error?

Re: MacOS GPU

Posted: Wed Mar 25, 2020 5:12 pm
by Joe_H
jjrscott wrote:Does anyone know how to get past this error?
I don't know, but under macOS it will be a waste of time currently. There is no folding core that runs on the macOS, so no work can or will be assigned to a GPU work request from an OS X/macOS system.

Elsewhere someone posted what they had done to get OpenCL recognized, at least in part. That was under one of the topics marked as being related to Mac's.

Re: MacOS GPU

Posted: Wed Mar 25, 2020 8:31 pm
by ash
jjrscott wrote:

Code: Select all

ln -s /System/Library/Frameworks/OpenCL.framework/OpenCL /usr/local/lib/libOpenCL.dylib
When I run the client I now get this:

Code: Select all

13:48:01:OpenCL Device 1: Platform:0 Device:1 Bus:NA Slot:NA Compute:1.2 Driver:1.2
13:48:01:OpenCL Device 2: Platform:0 Device:2 Bus:NA Slot:NA Compute:1.2 Driver:1.2
...
13:48:01:Enabled folding slot 01: PAUSED gpu:0:Baffin XT [Radeon RX 460] (waiting for idle)
13:48:01:ERROR:No compute devices matched GPU #0 AMD:5 Baffin XT [Radeon RX 460].  You may need to update your graphics drivers.
Does anyone know how to get past this error?
I like the cut of your jib, but linking a macOS library without recompilation was unlikely to work. What we need here is a debugger. This doesn't even say what functions it was running to come to this conclusion. The source code and a debugger, that's what we need.

Re: MacOS GPU

Posted: Sat Apr 04, 2020 10:15 pm
by SteveW928
DanGe wrote:Let this thread stand that there are dozens of us who are interested in MacOS GPU folding.All right, I'm done with memeing now. Hopefully we'll revisit this once the current fires are put out.
LOL, yeah when things start getting down to a niche of a niche, etc.

On the other hand, some of the higher-contributing groups out there probably have less members than the potential amount of Mac users, if Mac users got excited about the project. Pretty much anyone with a modern Mac could add an eGPU and start contributing. Sure, the Windows platform has higher numbers, but I'd imagine the folding-capable percentage of those is also insanely low (the cash register at the grocery store, or the $300 home computer isn't going to be folding either).

Re: MacOS GPU

Posted: Sat Apr 04, 2020 10:35 pm
by SteveW928
petery wrote: ... Even if I do just CPU folding, I shudder to think of the damage the heat would do to my laptop.

All in all, I've installed it to my pc, 3x 5,1 cMP towers, 2010 27in iMac, and 2013 21in iMac. Again with the iMac's, I had to rethink how much I'd want to use those, and settled on using it on Medium. iMacs and mbps are fragile things, simple dust messes with the butterfly switches. I've watched enough of Louis Rossmann's MacBook repair yt channel to know that they break easily. Do you really want to put your $1k+ iMac through heat torture? With the eGPU route, you could just as easily drop the price of Apple Care into a simple desktop that can utilize one.
Yes, unless things have changed (which I doubt), you have to be careful with Apple's laptops and iMac (probably mini, too). None of these are really made to run long-term at full output. They can do it, and certainly some do with big video encoding projects, 3D rendering, etc. but in my experience, that eventually takes its toll in the form of shortened life. The iMac Pro, Mac Pro, etc. are designed to run full-out all the time without problems. I hope they bring the iMac Pro thermal design to the iMac eventually.

But, I totally agree with you on the eGPU. So long as you limit the CPU use and use an eGPU, you've reduced/eliminated the issue, and could have a pretty powerful folding machine.
petery wrote:I believe the best option for Mac users that would like to use GPU folding, is to install windows. The time it takes for a few dozen of us to install windows and switch back through bootcamp as needed, would probably vastly be less than the time it takes to program for a new system. ... Honestly, it's just a sacrifice of convenience to have to bootcamp windows to run an eGPU or use cards in a tower, perhaps stay in macOS during the day, switch the windows for overnight.
Yes, that is certainly doable, but unless you already have Bootcamp setup, that's kind of a pain... and you have to have Windows, etc. If you have an eGPU, then it can really be a pain (not trivial to setup and get running, at all). That's what I've done in the past, as I needed Windows on Bootcamp anyway, but I now mostly run under MacOS, even for what I need Windows for (on Parallels). So, I don't really boot into Windows much.

I suppose I could still do that sometimes overnight. Hmm, I wonder if there are any issues from a Windows standpoint if you're regularly using the license for Bootcamp and Parallels? (Now that I migrated the Bootcamp to Parallels, I've not booted back into Bootcamp, and was going to eventually reclaim that partition. But, I hadn't considered just keeping both around, as I don't urgently need the storage space back.)

It would just be really nice to have it running all the time under MacOS. Also, that argument could be made for most any piece of software. It would often be easier to just do something by hand or an alternate way, than to write a piece of software to do it. But, once written, you get the ongoing benefits and multiplication of efforts easily.