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

Re: MacOS GPU

Postby SteveW928 » Fri Apr 10, 2020 10:25 pm

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 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby SteveW928 » Fri Apr 10, 2020 10:29 pm

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.
SteveW928
 
Posts: 23
Joined: Fri Apr 26, 2019 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby PantherX » Fri Apr 10, 2020 10:40 pm

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
User avatar
PantherX
Site Moderator
 
Posts: 6733
Joined: Wed Dec 23, 2009 10:33 am
Location: Land Of The Long White Cloud

Re: MacOS GPU

Postby SteveW928 » Fri Apr 10, 2020 11:36 pm

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?
SteveW928
 
Posts: 23
Joined: Fri Apr 26, 2019 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby PantherX » Sat Apr 11, 2020 12:15 am

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 :)
User avatar
PantherX
Site Moderator
 
Posts: 6733
Joined: Wed Dec 23, 2009 10:33 am
Location: Land Of The Long White Cloud

Re: MacOS GPU

Postby SteveW928 » Sun Apr 12, 2020 12:21 am

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.
SteveW928
 
Posts: 23
Joined: Fri Apr 26, 2019 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby ChristianVirtual » Sun Apr 12, 2020 1:48 am

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
User avatar
ChristianVirtual
 
Posts: 1596
Joined: Tue May 28, 2013 1:14 pm
Location: Tokyo

Re: MacOS GPU

Postby SteveW928 » Sun Apr 12, 2020 2:07 am

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.
SteveW928
 
Posts: 23
Joined: Fri Apr 26, 2019 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby zombie67 » Sun Apr 12, 2020 2:25 pm

If you are looking for projects that support GPU crunching on Mac: Primegrid, Einstein, Collatz.
Team SETI.USA
zombie67
 
Posts: 6
Joined: Mon Jul 15, 2013 1:29 am
Location: Reno, Nevada

Re: MacOS GPU

Postby foldy » Sun Apr 12, 2020 2:33 pm

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/1091171-howto-linux-folding-rig/
https://foldingforum.org/viewtopic.php?f=106&t=32362
foldy
 
Posts: 2008
Joined: Sat Dec 01, 2012 4:43 pm

Re: MacOS GPU

Postby SteveW928 » Sun Apr 12, 2020 8:56 pm

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 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby SteveW928 » Sun Apr 12, 2020 8:57 pm

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/1091171-howto-linux-folding-rig/
https://foldingforum.org/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.
SteveW928
 
Posts: 23
Joined: Fri Apr 26, 2019 9:19 pm
Location: Victoria BC, Canada

Re: MacOS GPU

Postby l008com » Sat May 09, 2020 11:31 am

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.
l008com
 
Posts: 6
Joined: Thu Apr 02, 2020 3:31 am

Re: MacOS GPU

Postby PantherX » Sat May 09, 2020 12:07 pm

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.
User avatar
PantherX
Site Moderator
 
Posts: 6733
Joined: Wed Dec 23, 2009 10:33 am
Location: Land Of The Long White Cloud

Re: MacOS GPU

Postby l008com » Sat May 09, 2020 12:40 pm

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.
l008com
 
Posts: 6
Joined: Thu Apr 02, 2020 3:31 am

PreviousNext

Return to New Donors start here

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron