![]() |
![]() |
#1 |
(loop (#_fork))
Feb 2006
Cambridge, England
11001001101012 Posts |
![]()
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 Last fiddled with by fivemack on 2010-09-25 at 19:36 |
![]() |
![]() |
![]() |
#2 |
Jul 2003
So Cal
2,399 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 |
![]() |
![]() |
![]() |
#3 |
(loop (#_fork))
Feb 2006
Cambridge, England
11001001101012 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 |
![]() |
![]() |
![]() |
#4 |
(loop (#_fork))
Feb 2006
Cambridge, England
33·239 Posts |
![]()
Is it a good sign if running the cudpp examples makes the power supply capacitors on my GPU play a little tune?
|
![]() |
![]() |
![]() |
#5 | |
Mar 2010
3·137 Posts |
![]() Quote:
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 |
|
![]() |
![]() |
![]() |
#7 |
Tribal Bullet
Oct 2004
5×709 Posts |
![]()
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 :)
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help building GMP for prime95 29.3 | Prime95 | Linux | 16 | 2017-08-29 18:02 |
Building sr1sieve for RPi | wombatman | Software | 14 | 2017-03-04 16:21 |
Building MSieve without VS? | SWSaunders | Msieve | 3 | 2013-04-26 11:19 |
Building gcc 4.4.0 | CRGreathouse | Software | 1 | 2009-07-07 22:25 |
Building on Linux? | FenwayFrank | Software | 4 | 2002-10-20 21:59 |