MacOS GPU

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

PantherX wrote:Have you considered running Ubuntu as a VM and see the eGPU can be functional? That way, it won't cost you another Windows license and you won't have to dual boot.
OK, I'll admit that I don't know too much what I'm doing, but I wasn't able to get it to work. Ubuntu seems to just recognize the eGPU (which surprised me), but F@H doesn't seem to see it. It won't let me setup a GPU slot at all.
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

foldinghomealone2 wrote:If you have a eGPU because you need it, give it a try.
If you want to buy a eGPU for folding then consider the following: The external case costs similar to a (new) PC usable for folding.
For GPU folding you can use low spec HW (except for the GPU)
Fair point! And, thanks for pointing that out lest someone go down this path just for folding.
PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: MacOS GPU

Post by PantherX »

SteveW928 wrote:...OK, I'll admit that I don't know too much what I'm doing, but I wasn't able to get it to work. Ubuntu seems to just recognize the eGPU (which surprised me), but F@H doesn't seem to see it. It won't let me setup a GPU slot at all.
It good to see that Ubuntu can recognize it. Out of curiosity, did you install the proprietary drivers for the GPU: https://itsfoss.com/install-additional-drivers-ubuntu/

It would be nice if you could post the log file here just in case someone knows how to resolve this issue.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

PantherX wrote:It good to see that Ubuntu can recognize it. Out of curiosity, did you install the proprietary drivers for the GPU: https://itsfoss.com/install-additional-drivers-ubuntu/
It would be nice if you could post the log file here just in case someone knows how to resolve this issue.
It doesn't show any 'Additional Drivers' when I follow the instructions on that site. I was wondering if I'd have to find Ubuntu/Linux AMD drivers from their site or something like that, but then it seems to see it.

My F@H log says:
03:36:57: GPUs: 0
03:36:57: CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
03:36:57: libcuda.so: cannot open shared object file: No such file or
03:36:57: directory
03:36:57: OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so':
03:36:57: libOpenCL.so: cannot open shared object file: No such file or
03:36:57: directory

and

03:36:57: <!-- Folding Slot Configuration -->
03:36:57: <gpu v='false'/>

Do I need to install OpenCL?
PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: MacOS GPU

Post by PantherX »

If it is an AMD, then it will need OpenCL drivers. For Nvidia, I believe it need OpenCL and CUDA. However, I don't know how to do that via the CLI, only the GUI :( Hopefully, someone else with CLI experience can provide you with some pointers :)
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

PantherX wrote:If it is an AMD, then it will need OpenCL drivers. For Nvidia, I believe it need OpenCL and CUDA. However, I don't know how to do that via the CLI, only the GUI :( Hopefully, someone else with CLI experience can provide you with some pointers :)
I messed with it for about an hour last night, but didn't have any luck. I'm out of my depth though... and then not even knowing it could possibly work, I don't know what direction to take.
Yes, if someone actually knows if it is possible, or knows of some instructions, etc. that would be cool.

It looks like BOINC can use the Mac GPU, but not the Rosetta project (for Covid-19) for some reason, and none of their projects that do are overly compelling. :| Bummer.
ChristianVirtual
Posts: 1596
Joined: Tue May 28, 2013 12:14 pm
Location: Tokyo

Re: MacOS GPU

Post by ChristianVirtual »

SteveW928 wrote:
PantherX wrote:If it is an AMD, then it will need OpenCL drivers. For Nvidia, I believe it need OpenCL and CUDA. However, I don't know how to do that via the CLI, only the GUI :( Hopefully, someone else with CLI experience can provide you with some pointers :)
I messed with it for about an hour last night, but didn't have any luck. I'm out of my depth though... and then not even knowing it could possibly work, I don't know what direction to take.
Yes, if someone actually knows if it is possible, or knows of some instructions, etc. that would be cool.

It looks like BOINC can use the Mac GPU, but not the Rosetta project (for Covid-19) for some reason, and none of their projects that do are overly compelling. :| Bummer.
try GPUGrid ?
ImageImage
Please contribute your logs to http://ppd.fahmm.net
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

ChristianVirtual wrote: try GPUGrid ?
No, but just taking a look at it now, it doesn't seem to support Mac, or does it?

----------

Oh, also, just thought I'd note that my Ubuntu panel says:
"Parallels using AMD Radeon pro 580 opengl engine"

So, it does seem to know the right GPU and type, but it is probably getting that from Parallels and is some kind of virtual emulation? I suppose the problem is similar to the Mac (via Parallels) where the performance was improved quite a bit recently (more recent DirectX, etc.), but it still isn't direct to hardware, which is probably what is needed.
zombie67
Posts: 6
Joined: Mon Jul 15, 2013 12:29 am
Location: Reno, Nevada

Re: MacOS GPU

Post by zombie67 »

If you are looking for projects that support GPU crunching on Mac: Primegrid, Einstein, Collatz.
Team SETI.USA
foldy
Posts: 2061
Joined: Sat Dec 01, 2012 3:43 pm
Hardware configuration: Folding@Home Client 7.6.13 (1 GPU slots)
Windows 7 64bit
Intel Core i5 2500k@4Ghz
Nvidia gtx 1080ti driver 441

Re: MacOS GPU

Post by foldy »

This is how I get OpenCL on Ubuntu:

Code: Select all

sudo apt-get install ocl-icd-libopencl1
sudo apt-get install ocl-icd-opencl-dev
Or see these links for Ubuntu setup for FAH:
https://linustechtips.com/main/topic/10 ... lding-rig/
viewtopic.php?f=106&t=32362
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

zombie67 wrote:If you are looking for projects that support GPU crunching on Mac: Primegrid, Einstein, Collatz.
Thanks. I notice there are some projects like that, but they aren't ones I'm interested in.
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

foldy wrote:This is how I get OpenCL on Ubuntu:

Code: Select all

sudo apt-get install ocl-icd-libopencl1
sudo apt-get install ocl-icd-opencl-dev
Or see these links for Ubuntu setup for FAH:
https://linustechtips.com/main/topic/10 ... lding-rig/
viewtopic.php?f=106&t=32362
Those seem to be already installed (if I'm reading correctly when I run them).
I'm probably giving up for now, unless someone runs across this who got it working. My hunch is that it won't work.
l008com
Posts: 6
Joined: Thu Apr 02, 2020 2:31 am

Re: MacOS GPU

Post by l008com »

Count my vote for GPU support on macOS. I run folding on a Mac Pro. My Mac Pro has a low end Nvidia card and a high end AMD card. Both of which sit idle while the CPU cranks away, and while the virus is out there, cranking away.

Also of note, there seems to be two negative ideas that are common in people's heads. One is that, if you can't offload an ENTIRE task to a GPU, then there is no benefit to using the GPU at all. This is not the case. Even partial use of a GPU while crunching a work unit can speed it up, and mean more completed WU's per day. Many BOINC projects run that way, where they use CPU and GPU together, not just pure GPU, to get work done.

Also, people seem to think integrated GPUs are of no use for computing. Now I am not an application programmer so I can't speak to the specific needs of protein folding simulations. However, again back to BOINC, there are many projects that can run work units on Nvidia, AMD and intel integrated GPUs. Even a small GPU boost on the Mac app will get multiplied by large number.

And while it is a small percentage of the whole, there are still a lot of Macs out there with powerful discrete graphics. Older first-gen Mac Pros are getting cheap but can still run very powerful, modern graphics cards. And the brand new Mac Pros, iMac Pros, and whichever other discrete GPUs are in more expensive Macs that could do a whole lot of crunching if only given that chance.
PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: MacOS GPU

Post by PantherX »

Welcome to the F@H Forum l008com,
l008com wrote:...if you can't offload an ENTIRE task to a GPU, then there is no benefit to using the GPU at all. This is not the case. Even partial use of a GPU while crunching a work unit can speed it up, and mean more completed WU's per day. Many BOINC projects run that way, where they use CPU and GPU together, not just pure GPU, to get work done....
Please note that while BOINC has that application setup that way, for F@H, there's no FahCore (the software that does the folding) that can use the CPU and GPU concurrently. There are two types of FahCore, one for the CPU (FahCore_a7) and the other for the GPU (FahCore_22). Within the CPU, it branches off to SSE support (for older CPUs) and AVX (for newer CPUs). For GPUs, it is currently a single one for both AMD and Nvidia GPUs. Again, there will be OS specific version so that's a lot of existing FahCores that need to be maintained. Adding a new feature generally takes months of hardwork and then the results needs to be validated. It's a good idea but will only be implemented if the scientific advancement is worth the development resources which is very limited.
l008com wrote:...people seem to think integrated GPUs are of no use for computing. Now I am not an application programmer so I can't speak to the specific needs of protein folding simulations. However, again back to BOINC, there are many projects that can run work units on Nvidia, AMD and intel integrated GPUs. Even a small GPU boost on the Mac app will get multiplied by large number...
Generally speaking, the GPUs will need to support OpenCL 1.2 and Double Precision. If they do, then it would be a nice a feature to support but again, it requires a new type of FahCore which isn't easy nor quick.
l008com wrote:...And while it is a small percentage of the whole, there are still a lot of Macs out there with powerful discrete graphics. Older first-gen Mac Pros are getting cheap but can still run very powerful, modern graphics cards. And the brand new Mac Pros, iMac Pros, and whichever other discrete GPUs are in more expensive Macs that could do a whole lot of crunching if only given that chance.
It does boils down to target audience. macOS is still a minority compared to Windows (https://gs.statcounter.com/os-market-share/desktop/) so with the limited development resources, it is better to invest in the area which is dominated by the market. Of course, since Apple has deprecated support of OpenCL, let's wait and see what happens but I wouldn't be holding my breath unless Apple provides a team of developers to not only build a FahCore that runs on their OS but to also maintain it regularity.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
l008com
Posts: 6
Joined: Thu Apr 02, 2020 2:31 am

Re: MacOS GPU

Post by l008com »

PantherX wrote: ... macOS is still a minority compared to Windows (https://gs.statcounter.com/os-market-share/desktop/) ...
I don't think that market share chart tells the whole story. While I'm sure there are more windows systems out in the world than Mac, many of those windows systems are old, el-cheapo systems in offices that would not be running anything like this. If there were some way to measure OS marketshare for computers that are real potential folders, I don't think the gap would be quite that large. But there isn't so I'll just keep on speculating I guess.
PantherX wrote:... unless Apple provides a team of developers to not only build a FahCore that runs on their OS but to also maintain it regularity.
This was another thought I had, actually. For a trillion dollar company, it wouldn't take many resources to provide a small team that could help F@H, Rosetta, and maybe just distributed computing projects in general, write Metal Computer or whatever it's called, native GPU cores for projects. It would help Apple show off Metal, it would give them plenty of goodwill. They would not only be helping the cause, but facilitating their large user-base to themselves, help the cause in a big way. Someone just needs to get this idea into "Tim Apple's" ear.
Post Reply