Page 6 of 7

Re: MacOS GPU

Posted: Fri Apr 10, 2020 9:25 pm
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.

Re: MacOS GPU

Posted: Fri Apr 10, 2020 9:29 pm
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.

Re: MacOS GPU

Posted: Fri Apr 10, 2020 9:40 pm
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.

Re: MacOS GPU

Posted: Fri Apr 10, 2020 10:36 pm
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?

Re: MacOS GPU

Posted: Fri Apr 10, 2020 11:15 pm
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 :)

Re: MacOS GPU

Posted: Sat Apr 11, 2020 11:21 pm
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.

Re: MacOS GPU

Posted: Sun Apr 12, 2020 12:48 am
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 ?

Re: MacOS GPU

Posted: Sun Apr 12, 2020 1:07 am
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.

Re: MacOS GPU

Posted: Sun Apr 12, 2020 1:25 pm
by zombie67
If you are looking for projects that support GPU crunching on Mac: Primegrid, Einstein, Collatz.

Re: MacOS GPU

Posted: Sun Apr 12, 2020 1:33 pm
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

Re: MacOS GPU

Posted: Sun Apr 12, 2020 7:56 pm
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.

Re: MacOS GPU

Posted: Sun Apr 12, 2020 7:57 pm
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.

Re: MacOS GPU

Posted: Sat May 09, 2020 10:31 am
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.

Re: MacOS GPU

Posted: Sat May 09, 2020 11:07 am
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.

Re: MacOS GPU

Posted: Sat May 09, 2020 11:40 am
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.