+- +-
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: CUDA for prime number search  (Read 35997 times)

Offline Pepi

  • Knight o' The Realm
  • **
  • Posts: 119
CUDA for prime number search
« on: 15 Sep 2011, 04:32:31 pm »
Since there is coders that understand coding and cuda very well, I ask anyone of you can you spent a little of your time and look in source code of this app and optimized it for better performance.
For now CUDA LLR is in average 2-3 times faster then one core of average cpu ( speed 3GHz) ( on my GTX 560 Ti) : Since you guys increase speed in optimized S@H app many times, I assume that you can make similar increase in speed also in this app.
So  for now I will wait will anyone will even answer to this post :)
Thanks for reading.

Offline Jason G

  • Construction Fraggle
  • Knight who says 'Ni!'
  • *****
  • Posts: 8980
Re: CUDA for prime number search
« Reply #1 on: 15 Sep 2011, 04:38:27 pm »
PrimeGrid ?  Is that the project you're referring to ?  Another user/developer (Heinz) has expressed interest in that one.  If he's interested in looking into optimisation for that I'll be happy to give him some hints / guidance.

Jason

Offline arkayn

  • Janitor o' the Board
  • Knight who says 'Ni!'
  • *****
  • Posts: 1230
  • Aaaarrrrgggghhhh
    • My Little Place On The Internet
Re: CUDA for prime number search
« Reply #2 on: 15 Sep 2011, 04:41:56 pm »
Collatz would be nice as well, maybe figure out what needs to be added to bring into compliance with the BOINC api.

I just wish I understood coding.

Offline Jason G

  • Construction Fraggle
  • Knight who says 'Ni!'
  • *****
  • Posts: 8980
Re: CUDA for prime number search
« Reply #3 on: 15 Sep 2011, 04:55:40 pm »
I just wish I understood coding.

Doesn't stop the rest of us  :D  What level are the mental barriers at ? 

Offline Pepi

  • Knight o' The Realm
  • **
  • Posts: 119
Re: CUDA for prime number search
« Reply #4 on: 15 Sep 2011, 04:56:49 pm »
PrimeGrid ?  Is that the project you're referring to ?  Another user/developer (Heinz) has expressed interest in that one.  If he's interested in looking into optimisation for that I'll be happy to give him some hints / guidance.

Jason

Yes, Primegrid is that project.  Since source code is very small I think you will find any "problems" really fast. Only "problem" is that app is 64 bit :(
You need to have cufft64_32_16.dll and cudart64_32_16.dll in same directory as llrcuda.exe ( attached as llrcuda.rar)
Source code is also attached in second archive.
Command is (example) llrcuda.exe -d -q"46157*2^698207+1"

Thanks for any help Jason!

Offline Jason G

  • Construction Fraggle
  • Knight who says 'Ni!'
  • *****
  • Posts: 8980
Re: CUDA for prime number search
« Reply #5 on: 15 Sep 2011, 05:00:45 pm »
Alright, I'll find out from Heinz what the score is.  With Seti almost completely Broken there are other things on my plate that take precedence, but Heinz should really be able to manage at least boincApi updates + some Cuda optimisation.

Offline Pepi

  • Knight o' The Realm
  • **
  • Posts: 119
Re: CUDA for prime number search
« Reply #6 on: 15 Sep 2011, 05:01:49 pm »
Collatz would be nice as well, maybe figure out what needs to be added to bring into compliance with the BOINC api.

I just wish I understood coding.

Yes Collatz needs cuda 4 app, but it looks like cuda 3.1 or cuda 3.2 or cuda4 will be aprox same speed...

Offline Jason G

  • Construction Fraggle
  • Knight who says 'Ni!'
  • *****
  • Posts: 8980
Re: CUDA for prime number search
« Reply #7 on: 15 Sep 2011, 05:04:55 pm »
Yes Collatz needs cuda 4 app, but it looks like cuda 3.1 or cuda 3.2 or cuda4 will be aprox same speed...

Cuda 4.0 is immature, so has some issues, so I've been sticking with Cuda 3.2 until Cuda 4.1 comes out.  x64 isn't a problem for any of us, only a question of whether it's worth bothering with apps that don't execute on CPU... 64 bit Cuda is slightly slower due to cost of larger pointers.

@Heinz:  As you already PM'd me about PG before, consider looking at PrimeGrid & Collatz & I will point you to the right directions.
« Last Edit: 15 Sep 2011, 05:18:59 pm by Jason G »

Offline Pepi

  • Knight o' The Realm
  • **
  • Posts: 119
Re: CUDA for prime number search
« Reply #8 on: 15 Sep 2011, 05:07:14 pm »
So can you putt down app in 32 bit? Any 32 bit app can be executed in 64 bit system, and it is easy to get 32 bit version of cuda dlls. And if you say that 64 bit is slower, just converting to 32 bit will increase speed :)

Offline Jason G

  • Construction Fraggle
  • Knight who says 'Ni!'
  • *****
  • Posts: 8980
Re: CUDA for prime number search
« Reply #9 on: 15 Sep 2011, 05:13:12 pm »
Probably.  Depends if they actually used enough (V)RAM to justify[or require] a 64 bit address space.  If they did that would be silly, since RAM is slower than computation these days, but anything is possible.

I won't be rushing into anything right now (as mentioned), but certainly since Heinz is interested in PG, and I know Heinz has the right tools etc, then probably it'll get looked at.

Jason

Offline Pepi

  • Knight o' The Realm
  • **
  • Posts: 119
Re: CUDA for prime number search
« Reply #10 on: 15 Sep 2011, 05:14:23 pm »
Thanks :)

Offline aaronhaviland

  • guinea-pig
  • Volunteer Developer
  • Knight o' The Realm
  • *****
  • Posts: 113
    • My computers at seti@home
Re: CUDA for prime number search
« Reply #11 on: 15 Sep 2011, 06:44:37 pm »
I'm pretty sure llrcuda is 64-bit due to the sheer size of the numbers they are dealing with. Even then, the app cannot deal with mersenne primes of the size that would qualify for the next EFF Cooperative Computing Award (100,000,000 digits).

Also, I believe that given a relatively recent CPU and GPU, it is still much slower on the GPU. It is *very*heavily* bound in cufft.

It's been more than a few months since I've looked that way. I had been meaning to look more closely at llrcuda before I dropped off the face of the planet a couple months ago...

The main developer for llrcuda is "msft" on mersenneforum.org. Someone else is doing the boinc-ification...

Offline Pepi

  • Knight o' The Realm
  • **
  • Posts: 119
Re: CUDA for prime number search
« Reply #12 on: 15 Sep 2011, 07:17:30 pm »
I know that GPU cannot be faster on any project that BOINC run, beside GPU is even now faster then CPU on some primes search, but compared to other BOINC project advantage is minimal. When you get power consumption of GPU and CPU then CPU is still better and cheaper way to find prime ( and works on all prime projects)

And for 32 or 64 bit , CPU also must have deal with big number, but all applications are 32 bits, even 64 bit host get 32 bit app. So it looks that 32 bit CUDA app will be ok ?

Offline Jason G

  • Construction Fraggle
  • Knight who says 'Ni!'
  • *****
  • Posts: 8980
Re: CUDA for prime number search
« Reply #13 on: 15 Sep 2011, 07:21:37 pm »
Lets see what Heinz says.  He's a busy man & has multiple exploded computers right now, But I think his interest does lie  there & will happily take advice & technology from here & apply it to other projects, if it helps spread 'not-breaking-seti-ness' (technical term) . 

Offline _heinz

  • Volunteer Developer
  • Knight who says 'Ni!'
  • *****
  • Posts: 2117
Re: CUDA for prime number search
« Reply #14 on: 16 Sep 2011, 06:56:23 pm »
Hi,
I run primegrid and compiled ppsieve-source with ICC already some time ago.
llrcuda I have not tried till now.
A year ago I compiled a Collatz client with ICC too.
I have done this to study source and testing CUDA and ICC.
If I get some support from Jason I can do the boinc-part changes as it is done in seti already.
I'm very busy, so I can do it as soon I have time.

heinz
 

 

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: 67
Most Online Ever: 983
(20 Jan 2020, 03:17:55 pm)
Users Online
Members: 0
Guests: 42
Total: 42
Powered by EzPortal