Can I multi-thread the CPU tasks?

Peter Hucker of the Scottish Boinc Team
Peter Hucker of...
Joined: 12 Aug 06
Posts: 513
Credit: 244,496,683
RAC: 141,121

I used to host a server

adrianxw wrote:

Multithreading is an attribute that is built into the program and is suitable for certain types of work only, (applications where the process can run in parallel). You cannot multithread a program that was not written to be multithreaded.

I used to have a tutorial on how to write multithreaded applications, but it is not online anymore. It discussed the hows and whys. I used to have a fixed internet connection so could host the site on my own server, but where I live now, the connection is shared between the houses on the estate and cannot support server hosting.

I used to host a server without a fixed IP.  I used a company called "dynamic DNS" or something.  But if you don't even get your own IP, I guess you'd need access to the main router for your estate so everything on a certain port was forwarded to you.

Peter Hucker of the Scottish Boinc Team
Peter Hucker of...
Joined: 12 Aug 06
Posts: 513
Credit: 244,496,683
RAC: 141,121

Eugene Stemple

Eugene Stemple wrote:

@Mikey

I think what you're looking for is the <project_max_concurrent> tag in the app_config.xml file, and this goes at the top level - right after the opening <app_config> tag.  I set that to one less than the number of cores although one can set equal to number of cores if one can tolerate the consequent response lag.  There is also a tag for <max_concurrent> for each different application section.  I don't use the <avg_ncpus> tag so I think you can safely delete that line.  Yes, I'm seeing 3 to 4 hours per CPU task; I give 6 cores to Einstein, where one is usually supporting a GPU task and the remaining 5 run CPU tasks.  Sure, the GPU is ~10 times more productive, but 5 otherwise idle CPUs give half-a-GPU production and that's worthwhile in my mind.

 

 

I even stopped doing that, I allow all 6 cores to run CPU tasks,  The GPU tasks are automatically set at a higher priority and are not slowed down by CPU tasks.  This way my CPU and GPU are both at 100% load all the time.

Peter Hucker of the Scottish Boinc Team
Peter Hucker of...
Joined: 12 Aug 06
Posts: 513
Credit: 244,496,683
RAC: 141,121

mikey wrote: There is at

mikey wrote:

There is at some Projects but the programmers didn't make the workunits so they can be done that way here. Prime Grid workunits, the LLR ones, are also written so they can be multi-threaded and are significantly faster when you throw more cpu cores as a workunit. MIlkyWay wrote their current units from the beginning to allow multi-threading and they are much faster the more cpu cores you throw at them. And yes you can get a "free lunch" as you call it if the units fit into memory and the units are designed that way.

 

I can't believe a multithreaded task on 5 cores goes faster than the total of 5 tasks on 1 core each.

Peter Hucker of the Scottish Boinc Team
Peter Hucker of...
Joined: 12 Aug 06
Posts: 513
Credit: 244,496,683
RAC: 141,121

Keith Myers wrote: You could

Keith Myers wrote:

You could try and run doubles at least on each gpu since all we have to crunch now is Gamma-Ray gpu tasks.  They are easy on the memory needs. Not like the heavy memory usage of the Gravity Wave app.

Do you know what's happened to gravity?  Have they run out of data?  Are they in the middle of a scientific breakthrough?  Are they making the program better?

Keith Myers
Keith Myers
Joined: 11 Feb 11
Posts: 2,122
Credit: 5,312,436,453
RAC: 19,192,528

Peter Hucker wrote: Keith

Peter Hucker wrote:

Keith Myers wrote:

You could try and run doubles at least on each gpu since all we have to crunch now is Gamma-Ray gpu tasks.  They are easy on the memory needs. Not like the heavy memory usage of the Gravity Wave app.

Do you know what's happened to gravity?  Have they run out of data?  Are they in the middle of a scientific breakthrough?  Are they making the program better?

Back awhile in news they announced a new research paper based on the results of the returned GW cpu tasks.  Then they stopped distributing any new work.  Someone asked if they would start up a new search and they responded with  . . . maybe, thinking about it . .  but not now.

They still are distributing GW gpu work.

 

archae86
archae86
Joined: 6 Dec 05
Posts: 3,064
Credit: 5,779,567,597
RAC: 3,883,737

Keith Myers wrote:They still

Keith Myers wrote:

They still are distributing GW gpu work.

Barely true.

Bernd advised us on July 20, 2020 that new GW GPU work unit creation was ending momentarily.  There is a limited supply still in distribution of resends to fill out quorums for WUs for which participants failed to make a timely successful reply, or for quorum comparison got a mismatch.

In a later comment in the same thread, Bernd implied that the next run would definitely have GPU work and might have CPU work.

Peter Hucker of the Scottish Boinc Team
Peter Hucker of...
Joined: 12 Aug 06
Posts: 513
Credit: 244,496,683
RAC: 141,121

archae86 wrote: Bernd

archae86 wrote:

Bernd advised us on July 20, 2020 that new GW GPU work unit creation was ending momentarily.  There is a limited supply still in distribution of resends to fill out quorums for WUs for which participants failed to make a timely successful reply, or for quorum comparison got a mismatch.

In a later comment in the same thread, Bernd implied that the next run would definitely have GPU work and might have CPU work.

Thanks for the info.  What seems strange is there isn't a sudden influx of extra people doing Gamma.  What are those of you that only did Gravity on GPU doing with those GPUs now?

P.S. today I'm mourning the passing of one of my R9 280X GPUs.  Completely dead.  Computer refuses to start with it plugged in, won't power up (although standby voltage is ok).  It seems one of the two fans seized, and although the other fan was cooling the GPU itself ok, it was not cooling the power regulator (which had it's own seperate heatsink).  It smells bad and stops the PC booting, so I guess it's had it.  It's going on Ebay for spares or repairs.  Perhaps somebody can join it with one where they've broken the GPU chip.

DanNeely
DanNeely
Joined: 4 Sep 05
Posts: 1,358
Credit: 2,809,853,420
RAC: 2,688,405

Peter Hucker wrote: mikey

Peter Hucker wrote:

mikey wrote:

There is at some Projects but the programmers didn't make the workunits so they can be done that way here. Prime Grid workunits, the LLR ones, are also written so they can be multi-threaded and are significantly faster when you throw more cpu cores as a workunit. MIlkyWay wrote their current units from the beginning to allow multi-threading and they are much faster the more cpu cores you throw at them. And yes you can get a "free lunch" as you call it if the units fit into memory and the units are designed that way.

 

I can't believe a multithreaded task on 5 cores goes faster than the total of 5 tasks on 1 core each.

The way it can work is by sharing the same set of data they can reduce cache contention and have more of the data needed in the really fast memory on the CPU itself instead of the slower main system ram.  The hard part is in sharing writable memory without either slowing things down so much via locks that you lose any potential gains or creating bugs when one thread stomps on a second threads changes.  Avoiding that is why most boinc projects just write single threaded apps and run one instance per core.

 

Prime Grid is an easy case for multi-threading since they only need to keep track of a few numbers to know where in the search they are (most LLR tests find a divisor after a few tests proving a number isn't prime); so splitting the total search range up into N parts one/core is a simple change and each of the N threads can work independently on one Nth of the total work.  (They might use a more sophisticated way of splitting the work to deal with occasional numbers that only have huge factors, but this suffices for illustrative purposes.)

 

I don't know enough about how MW works to speculate on why they're able to easily scale across multiple cores.

mikey
mikey
Joined: 22 Jan 05
Posts: 8,428
Credit: 642,316,340
RAC: 149,668

Peter Hucker wrote: archae86

Peter Hucker wrote:

archae86 wrote:

Bernd advised us on July 20, 2020 that new GW GPU work unit creation was ending momentarily.  There is a limited supply still in distribution of resends to fill out quorums for WUs for which participants failed to make a timely successful reply, or for quorum comparison got a mismatch.

In a later comment in the same thread, Bernd implied that the next run would definitely have GPU work and might have CPU work.

Thanks for the info.  What seems strange is there isn't a sudden influx of extra people doing Gamma.  What are those of you that only did Gravity on GPU doing with those GPUs now?

P.S. today I'm mourning the passing of one of my R9 280X GPUs.  Completely dead.  Computer refuses to start with it plugged in, won't power up (although standby voltage is ok).  It seems one of the two fans seized, and although the other fan was cooling the GPU itself ok, it was not cooling the power regulator (which had it's own seperate heatsink).  It smells bad and stops the PC booting, so I guess it's had it.  It's going on Ebay for spares or repairs.  Perhaps somebody can join it with one where they've broken the GPU chip. 

Why not just replace the fan? I have a friend that used case fans screwed to the case of the gpu move alot more air than the standard gpu fan. It's not pretty and won't work with a gpu next to it, waaay too wide now, but it keeps them cool.

Keith Myers
Keith Myers
Joined: 11 Feb 11
Posts: 2,122
Credit: 5,312,436,453
RAC: 19,192,528

Quote:It smells bad Almost

Quote:
It smells bad

Almost certainly means electronics or semiconductors burnt up on the board.  Not salvageable without PC board repair.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.