![]() |
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 [/code] which feels as if nvcc is using the [b]system[/b] 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. |
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 |
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 [url]http://www.linux.com/news/software/developer/81090-c-the-gpu-and-thrust-sorting-numbers-on-the-gpu[/url]) makes it all compile nicely. If slowly. |
Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?
|
[QUOTE=fivemack;231437]Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?[/QUOTE]
No, but it's not a bad one either. D'you have GTX 285 ? They have a funny problem with singin' cards. |
[QUOTE=fivemack;231437]Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?[/QUOTE]Does it sound anything like [URL="http://en.wikipedia.org/wiki/Arc_Attack"]this[/URL]?
|
[QUOTE=fivemack;231437]Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?[/QUOTE]
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 :) |
| All times are UTC. The time now is 22:52. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.