+- +-
Say hello if visiting :) by Gecko
11 Jan 2023, 07:43:05 pm

Seti is down again by Mike
09 Aug 2017, 10:02:44 am

Some considerations regarding OpenCL MultiBeam app tuning from algorithm view by Raistmer
11 Dec 2016, 06:30:56 am

Loading APU to the limit: performance considerations by Mike
05 Nov 2016, 06:49:26 am

Better sleep on Windows - new round by Raistmer
26 Aug 2016, 02:02:31 pm

Author Topic: AK V8 + CUDA MB team work mod  (Read 139666 times)

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
AK V8 + CUDA MB team work mod
« on: 25 Jan 2009, 06:06:23 am »
This version intended to allow simultaneous SETI MB processing on CPU and GPU on the same host.

It's just workaround of BOINC's inability to maintain such config. So, as any workaround it has its own advantages, disadvantages and limitations. Peruse known issues and use this package wisely. Please, report all unknows issues in this thread.

Lets begin:
1) This first "proof of concept" version will work only on SSSE3-capable hosts (sorry AMD fans, if this will work SSE3  will be supported too of course). Only Intel Core and up for now.
1a) Now SSSE3,SSE3 and SSE2 supported.  AMD CPUs should use SSE3-variant with _AMD in name (if CPU supports SSE3 of course ;) otherwise - SSE2 ).
2) This package can work ONLY on SETI main. Even don't try to use it on SETI beta - you can lose tasks for nothing.
3) This CPU-GPU team will not play nicely with other GPU-related projects like GPU-grid. It's because no BOINC GPU-management mechanism is used in this version.
This fact has positive side too - you do not need GPU-aware BOINC at all. You just need host with CUDA-supported GPU. It should work even with BOINC 5.xx
4) <ncpus>NUMBER_OF_CORES+1</ncpus> is REQUIRED for productive work. If you let BOINC manage CPU cores number you will end up with one idle core, trust me ;)
5) This AK V8 build was not PGOed so it will show worse performance than current CPU-only AK V8 SSSE3x app (will be fixed if this approach will be useful)(fixed already)
6) Probably will not use second GPU on dual-GPU hosts. (confirmed)

How it works:
for BOINC it looks as usual CPU opt app installed. BOINC will call CPU app (AK_v8b_win_SSSE3x_GPU_CPU_team.exe in our case) ans assign one of SETI MB tasks for it. But this app aware of possibility to use GPU for computations. It will check if another instance (it knows only itself and its clones, so - no other GPU-related projects please) already use GPU and if not - will start GPU-related app (MB_6.08_mod_CPU_team_CUDA.exe in our case) and suspend itself until GPU app finish. This CUDA app will do all work as usually but will do it on GPU leave CPU almost free.
That's why you should increase number of cores. BOINC should run NUMBER_OF_CORES+1 app thinking they all are CPU-related (some cheating of poor old BOINC here ;) )

After installation try to keep eye on first few results - this is pretty new approach and I can't give any guaranties if it will work for your config. If something will go wrong, please, revert to old variant you used before and describe your issue  in this thread.

P.S. Now you can easily see how fast CUDA is indeed (on non-VLAR tasks). CPU apps completed <20% of their tasks when CUDA app finished its first task on my Q9450+9600GSO host ;)
Enjoy!

[attachment deleted by admin]
« Last Edit: 04 Feb 2009, 01:48:03 pm by Raistmer »

Offline Richard Haselgrove

  • Messenger Pigeon
  • Knight who says 'Ni!'
  • *****
  • Posts: 2819
Re: AK V8 + CUDA MB team work mod
« Reply #1 on: 25 Jan 2009, 06:55:50 am »
I was in the middle of flushing my Beta queue on the Q9300 anyway, since we have no new versions to test just now. I'll give this a run when I'm ready to switch, but it may be six hours or so till I get there - not quite sure how many of the remaining tasks are VLAR.

Have you any idea how compatible this package is with AP, if I transfer my r103 block into the app_info?

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #2 on: 25 Jan 2009, 06:58:29 am »
AP r103 is included as usually ! IT should work with AP too. But if you will have only AP tasks it will do NUMBER_OF_CORES+1 AP r103 and no CUDA MB. => GPU will be idle.
(AP r103 provided "as is" w/o any modifications, it will use CPU just as will do any another app from another CPU-only project as Einstein for example. I expect some issues only with another GPU-enabled projects. And some inefficiencies because of BOINC inability to pair projects. This VERY needed feature still missing! We need option to pair one project with another....
I will post beta-site variant in pre-release area. This one will not work on beta.
« Last Edit: 25 Jan 2009, 07:07:20 am by Raistmer »

Grey Shadow

  • Guest
Re: AK V8 + CUDA MB team work mod
« Reply #3 on: 25 Jan 2009, 12:47:06 pm »
Hi again.

Great mod, thanks a lot. The first one allowing me to crunch MB units with CUDA and at the same time use my PC for other tasks. However one bug still persists (it is present also in stock 6.08, according to my experience). Certain MB workunits start as usually (about 30 seconds with CPU, then switch to GPU), but are processed extremely slow (almost as AP ones). Also when they are processed PC starts working much slower so usually I have to cancel them manually.

The sample of such workunit is http://setiathome.berkeley.edu/result.php?resultid=1134111853

It looke like this is the same VLAR issue?

Is it possible to do something to prevent this? Do you mind adding VLAR-killing ability to this mod?
« Last Edit: 25 Jan 2009, 01:39:39 pm by Grey Shadow »

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #4 on: 25 Jan 2009, 01:50:34 pm »

Is it possible to do something to prevent this? Do you mind adding VLAR-killing ability to this mod?

Yes. This mod could be extended in two ways.
1) More advanced CPU/GPU choosing at app start. That is, if task is VLAR - stay with CPU, else - try pass task to GPU.
2) VLAR autokill mod.

Grey Shadow

  • Guest
Re: AK V8 + CUDA MB team work mod
« Reply #5 on: 25 Jan 2009, 02:18:57 pm »
Thanks, will be waiting for these modifications :)
« Last Edit: 25 Jan 2009, 02:21:45 pm by Grey Shadow »

Offline Richard Haselgrove

  • Messenger Pigeon
  • Knight who says 'Ni!'
  • *****
  • Posts: 2819
Re: AK V8 + CUDA MB team work mod
« Reply #6 on: 25 Jan 2009, 02:41:46 pm »
Finally cleared the last of my VLARs at Beta, installed this mod - and guess what, I got a 20-full of VLAR at Main!

Like http://setiathome.berkeley.edu/result.php?resultid=1134023275 - AR=0.009331

This rig will do that sort of AR quicker on the CPU than the GPU, so I'd be interested in option (1) - hand over to CPU at VLAR - rather than autokill.

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #7 on: 25 Jan 2009, 03:21:03 pm »
Finally cleared the last of my VLARs at Beta, installed this mod - and guess what, I got a 20-full of VLAR at Main!

Like http://setiathome.berkeley.edu/result.php?resultid=1134023275 - AR=0.009331

This rig will do that sort of AR quicker on the CPU than the GPU, so I'd be interested in option (1) - hand over to CPU at VLAR - rather than autokill.
It's really possible. Especially on quad!

Algorithm:
1) Suspend all tasks.
2) resume non-VLAR task - it will be assigned to CUDA app. (I suppose SETI is single active project - you could enhance algorithm for more complex cases)
3) resume 4 (for quad) VLAR tasks - they will be assigned to CPU. Resume some non-VLARS for GPU. (GPU will crunch much faster so while CPU finish VLAR, GPU will finish few non-VLARs).

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #8 on: 25 Jan 2009, 03:23:00 pm »
Thanks, will be waiting for these modifications :)
No sense to wait - use current version right now instead. Even with slow VLAR processing the use GPU is free addon to CPU now (of course if you don't participate in other GPU-related projects.)

Offline Richard Haselgrove

  • Messenger Pigeon
  • Knight who says 'Ni!'
  • *****
  • Posts: 2819
Re: AK V8 + CUDA MB team work mod
« Reply #9 on: 25 Jan 2009, 03:43:46 pm »

Algorithm:
1) Suspend all tasks.
2) resume non-VLAR task - it will be assigned to CUDA app. (I suppose SETI is single active project - you could enhance algorithm for more complex cases)
3) resume 4 (for quad) VLAR tasks - they will be assigned to CPU. Resume some non-VLARS for GPU. (GPU will crunch much faster so while CPU finish VLAR, GPU will finish few non-VLARs).


Snag:
1) CPUs busy on 2 x AP, and 2 x Einstein - can't divert them to GPU
2) MB cache currently consists entirely of VLAR - all too similar to my Beta experience

So like you say, I'll just treat the GPU as a free bonus, and let it carry on at the best speed it can manage.

One possible drawback of your mod, and the way it bypasses BOINC's knowledge of CUDA: it doesn't do task-switching very well - I've already found it trying to run 5 x CPU and 0 x GPU a couple of times. Easy to manage with task suspension, but it still means babysitting.

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #10 on: 25 Jan 2009, 05:00:16 pm »

One possible drawback of your mod, and the way it bypasses BOINC's knowledge of CUDA: it doesn't do task-switching very well - I've already found it trying to run 5 x CPU and 0 x GPU a couple of times. Easy to manage with task suspension, but it still means babysitting.

If only SETI MB used - all will be fine - always 4+1. If you will use AP too - things bacome complicated - yes, 5+0 possible (if no free SETI MB tasks) And if another project is used too, well, chances to get 5+0 increase. It could be solved by increasing SETI project share.
Sure task scheduling is BOINC job, no science app job. And my mod just works instead BOINC now.

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #11 on: 25 Jan 2009, 05:11:30 pm »
This is replacement for CUDA part of V8 of my package. This build has VLAR autokill ability.
You need to decompress this file into SETI project directory (when BOINC switched off of course) if you don't want process VLAR on CUDA.

That is, if VLAR task goes to CPU app - it will be processed. If it goes to CUDA app - task will be aborted with error (BAD_HEADER).

EDIT: There was wrong file name  (.exe twice). Archive replaced, please, remove secondary .exe by renaming manually or download new archive.


[attachment deleted by admin]
« Last Edit: 25 Jan 2009, 05:33:17 pm by Raistmer »

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #12 on: 26 Jan 2009, 11:10:08 am »
V8a update available.
Changes:

- VLAR autokill mod enabled for CUDA app
- PGO redone for CPU app
- Wall-clock elapsed time since last restart (or since start of task) is added to stderr for both apps.

Offline Slawek

  • Knight o' The Realm
  • **
  • Posts: 55
Re: AK V8 + CUDA MB team work mod
« Reply #13 on: 26 Jan 2009, 11:51:58 am »
AMD  SSE3 (X2 Athlon ) working on this build ?

Offline Raistmer

  • Working Code Wizard
  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 14349
Re: AK V8 + CUDA MB team work mod
« Reply #14 on: 26 Jan 2009, 11:57:38 am »
AMD  SSE3 (X2 Athlon ) working on this build ?

No, will do SSE3 soon.
BTW, does anyone need SSE2 and low ?
That is, does anybody have SSE2-only CPU with CUDA-enabled GPU ?

 

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?
Members
Total Members: 97
Latest: ToeBee
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 59559
Total Topics: 1672
Most Online Today: 253
Most Online Ever: 983
(20 Jan 2020, 03:17:55 pm)
Users Online
Members: 0
Guests: 226
Total: 226
Powered by EzPortal