mersenneforum.org trouble building cudpp
 Register FAQ Search Today's Posts Mark Forums Read

 2010-09-25, 19:34 #1 fivemack (loop (#_fork))     Feb 2006 Cambridge, England 144648 Posts trouble building cudpp So, I'm looking for points on the quartic surfaces a^4+b^4+c^4=Nd^4 ( for example, N=227 I have the point {861:1825:2059:601} ) On CPU, I do this by: loop over residue classes R modulo some P for a=0..P, find b with a^4+b^4==R (P) and store them in a hash table indexed by (a^4+b^4) modulo some other Q for c=0..P, find d with N*c^4-d^4==R (P); look up (N*c^4-d^4) mod Q in the hash table, and if there's a match then output [a b c d]. Which is fine; running up to 10^6 takes about a CPU-week. Obviously, with a hash table, this isn't terribly suited to a CUDA implementation - I'm not at all sure how you do a linked-list with CUDA without ending up with all the threads contending horribly on the next-place-to-allocate pointer - so I'm contemplating writing out the {(a^4+b^4)%Q,a,b} tuples with a^4+b^4==R (P) and explicitly sorting them. cudpp exists and contains a couple of sort implementations. But I can't compile it: the instructions are straightforward, but when I do 'cd cudpp; make' I get lots of messages which I very much don't understand, of the form Code: /usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbit(double)’ cannot be declared weak which feels as if nvcc is using the system C libraries and that they're incompatible with it. If I google for the error message, the only advice I see is 'install an older version of ubuntu', which doesn't exactly appeal. Last fiddled with by fivemack on 2010-09-25 at 19:36
 2010-09-25, 20:01 #2 frmky     Jul 2003 So Cal 3×751 Posts nvcc uses the system gcc/g++ but doesn't yet support version 4.4. Presuming that you are using Ubuntu, you can sudo apt-get install gcc-4.3 g++-4.3 and you can then use gcc-4.3 rather than gcc, and use the --compiler-bindir option. Perhaps more simply you can use update-alternatives to switch system compilers. Install the options with the commands sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.3 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.3 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4 then switch between them using sudo update-alternatives --config gcc
 2010-09-25, 20:13 #3 fivemack (loop (#_fork))     Feb 2006 Cambridge, England 22×1,613 Posts Thanks! I'd tried setting CC=gcc-4.3 in common.mk but that wasn't enough because NVCC doesn't call \$(CC); setting NVCC := nvcc --compiler-bindir /home/nfsslave2/gcc43 and doing 'ln -s /usr/bin/gcc-4.3 /home/nfsslave2/gcc43/gcc' (as suggested by http://www.linux.com/news/software/d...ers-on-the-gpu) makes it all compile nicely. If slowly. Last fiddled with by fivemack on 2010-09-25 at 20:15
 2010-09-25, 20:37 #4 fivemack (loop (#_fork))     Feb 2006 Cambridge, England 22·1,613 Posts Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?
2010-09-25, 21:34   #5
Karl M Johnson

Mar 2010

3·137 Posts

Quote:
 Originally Posted by fivemack Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?
No, but it's not a bad one either.
D'you have GTX 285 ?
They have a funny problem with singin' cards.

Last fiddled with by Karl M Johnson on 2010-09-25 at 21:35 Reason: yes

2010-09-26, 03:09   #6
schickel

"Frank <^>"
Dec 2004
CDP Janesville

1000010010102 Posts

Quote:
 Originally Posted by fivemack Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?
Does it sound anything like this?

2010-09-26, 03:14   #7
jasonp
Tribal Bullet

Oct 2004

3·1,181 Posts

Quote:
 Originally Posted by fivemack Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?
The alpha that I used to learn software pipelining would emit a very high-pitched tone when optimized code was pounding on memory. It's a sign you're doing well :)

 Similar Threads Thread Thread Starter Forum Replies Last Post Prime95 Linux 16 2017-08-29 18:02 wombatman Software 14 2017-03-04 16:21 SWSaunders Msieve 3 2013-04-26 11:19 CRGreathouse Software 1 2009-07-07 22:25 FenwayFrank Software 4 2002-10-20 21:59

All times are UTC. The time now is 07:00.

Tue Jan 18 07:00:38 UTC 2022 up 179 days, 1:29, 0 users, load averages: 1.73, 1.42, 1.30