Multiple GPUs and CPUs?

Moderators: Site Moderators, FAHC Science Team

Peter_Hucker
Posts: 308
Joined: Wed Feb 16, 2022 1:18 am

Multiple GPUs and CPUs?

Post by Peter_Hucker »

The documentation says FAHClient (only v8?) allows for using multiple GPUs and CPUs (I assume it means CPU cores for the last one unless it's going to spread across computers!) on a single task. I don't see this happening, each task is using 1 GPU and 1 CPU (I'm only doing GPU work, I've ticked all the GPUs to run and turned the CPU cores down to minimum). Is this something planned for the future and scientists haven't released tasks utilising it yet, since not many volunteers are using v8 yet?
jonault
Posts: 216
Joined: Fri Dec 14, 2007 9:53 pm

Re: Multiple GPUs and CPUs?

Post by jonault »

On my machine it's intermittent. Sometimes I'll get 7 of the 8 CPU cores attached to one of the GPU tasks, other times the GPU tasks will get just get 1 CPU each and the remaining 6 CPU cores will work on their own task. I just let it do what it wants. But I let my system use all the CPU cores - if you've told your system to minimize CPU usage it sounds like you're getting what you asked for.
Image
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Multiple GPUs and CPUs?

Post by calxalot »

For now, you can get more control by making a Resource Group for each GPU, similar to v7 slots.

Set everything to Finish and wait for pause before changing resource allocation.

In client Settings, create a RG by adding a peer that begins with "/". Example /gpu1
Add resources to the group after removing those resources from the default unnamed group.
A GPU RG should have one cpu and one gpu selected.

If you don't want to do CPU folding, set cpus to zero for the default group.
Peter_Hucker
Posts: 308
Joined: Wed Feb 16, 2022 1:18 am

Re: Multiple GPUs and CPUs?

Post by Peter_Hucker »

No I didn't ask it not to use the CPU. I asked it to use the CPU only to assist the GPUs. I assume pushing the slider all the way to the left means don't do CPU tasks, since as you add GPUs, the minimum increases by 1 per GPU.

I also don't get any tasks using both GPUs at once.
jonault
Posts: 216
Joined: Fri Dec 14, 2007 9:53 pm

Re: Multiple GPUs and CPUs?

Post by jonault »

Peter_Hucker wrote: Thu Feb 09, 2023 4:02 am No I didn't ask it not to use the CPU. I asked it to use the CPU only to assist the GPUs. I assume pushing the slider all the way to the left means don't do CPU tasks, since as you add GPUs, the minimum increases by 1 per GPU.
I think the slider does exactly what it says & sets the number of CPU cores it will use for folding. Since you have to have one CPU per GPU, it won't go below that, but if you slide it all the way to the left that's all you get - one core per GPU and no more. If you want to devote all the remaining CPU cores to one of the GPU tasks, you'll need to do what calxalot said & create a Resource Group containing one GPU and all the CPU cores except one.
I also don't get any tasks using both GPUs at once.
I haven't seen any tasks like that yet either.
Last edited by jonault on Thu Feb 09, 2023 4:30 am, edited 1 time in total.
Image
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Multiple GPUs and CPUs?

Post by calxalot »

Not quite. Each RG should only get one cpu and one gpu.
jonault
Posts: 216
Joined: Fri Dec 14, 2007 9:53 pm

Re: Multiple GPUs and CPUs?

Post by jonault »

calxalot wrote: Thu Feb 09, 2023 4:23 am Not quite. Each RG should only get one cpu and one gpu.
But won't that limit each folding task to using just one CPU and one GPU?
Image
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Multiple GPUs and CPUs?

Post by calxalot »

You want the RG to only fold one GPU WU.
jonault
Posts: 216
Joined: Fri Dec 14, 2007 9:53 pm

Re: Multiple GPUs and CPUs?

Post by jonault »

Right, but how many CPU cores would it use? Would it ever go above 1?
Image
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Multiple GPUs and CPUs?

Post by calxalot »

You create a RG for each GPU, using the Peers list.
Remaing cpus can be assigned to default unnamed group.

If you create a Resource Group Peer, this will be clearer.

RGs are an undocumented feature.
jonault
Posts: 216
Joined: Fri Dec 14, 2007 9:53 pm

Re: Multiple GPUs and CPUs?

Post by jonault »

So the default group doesn't get assigned a folding task?

I guess I'll have to try doing this tomorrow.

Sorry for all the questions, I'm just trying to understand how this works.
Image
Peter_Hucker
Posts: 308
Joined: Wed Feb 16, 2022 1:18 am

Re: Multiple GPUs and CPUs?

Post by Peter_Hucker »

This is getting complicated. I want to do mainly GPU work, so no CPU-only work at all. On the remote chance of a GPU task wanting more than one CPU core for assistance, I want to allow that. If it happens a lot, I can turn down the Asteroids stuff to leave more CPU cores free.

Can someone explain how I would achieve this? Perhaps by setting each of the two GPUs to have 12 cores each?
calxalot
Site Moderator
Posts: 1115
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Multiple GPUs and CPUs?

Post by calxalot »

The default group uses whatever resources you assign.

A GPU WU only needs one cpu.

You have to remove resources from default group before you can then add those resources to a RG.
Peter_Hucker
Posts: 308
Joined: Wed Feb 16, 2022 1:18 am

Re: Multiple GPUs and CPUs?

Post by Peter_Hucker »

If a GPU only ever needs one CPU core, I don't need to change anything. I guess I just wait to see if any tasks use two GPUs. I have one machine with 3 identical GPUs, and one with two different ones (one is twice the speed). So I might see something one day.
jonault
Posts: 216
Joined: Fri Dec 14, 2007 9:53 pm

Re: Multiple GPUs and CPUs?

Post by jonault »

A GPU WU needs one cpu, but some GPU work units will use more than that if they're available - I've had work units with 1 GPU and 7 CPU cores assigned. So I thin the quest Peter is asking is how can you make your CPU cores available to assist a GPU WU but prevent them from being assigned to a CPU WU.
Image
Post Reply