mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Sierpinski/Riesel Base 5

Reply
 
Thread Tools
Old 2007-03-04, 01:46   #1
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5×701 Posts
Default sieving on Playstation Portable

This may sound nutty, but I´ve been led to believe that´s it´s possible to do sieving on the Playstation Portable.

Is this possible? And if so, could someone help me compile a binary?
jasong is offline   Reply With Quote
Old 2007-03-06, 21:35   #2
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

22058 Posts
Default

Quote:
Originally Posted by jasong View Post
This may sound nutty, but I´ve been led to believe that´s it´s possible to do sieving on the Playstation Portable.

Is this possible? And if so, could someone help me compile a binary?
Compiling srsieve for the Playstation should not be much different from compiling any other C program for the Playstation, but I don't know how to do that either.

If you can install Linux on the machine itself then just run `make' on the source, that should produce a working binary, though without hand-coded assembler it will run at about half its potential speed.
geoff is offline   Reply With Quote
Old 2007-03-11, 01:33   #3
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5·701 Posts
Default

Quote:
Originally Posted by geoff View Post
Compiling srsieve for the Playstation should not be much different from compiling any other C program for the Playstation, but I don't know how to do that either.

If you can install Linux on the machine itself then just run `make' on the source, that should produce a working binary, though without hand-coded assembler it will run at about half its potential speed.
Anything I should do or know before I get to the make command? In other words, if I wanted to tweak the code, or actually tell the code to tweak itself(since I'm not a programmer) what should I be finding out about?
jasong is offline   Reply With Quote
Old 2007-03-11, 01:37   #4
thommy
 
thommy's Avatar
 
Dec 2006

3310 Posts
Default

why don't you try it first? do you even have and linux psp, or do you just wanna know?

cheers
thommy is offline   Reply With Quote
Old 2007-03-11, 06:58   #5
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

DB116 Posts
Default

This is what I get when I type make:
Code:
$ make
gcc -O2  -DNDEBUG  -c -o srsieve.o srsieve.c
gcc -O2  -DNDEBUG  -c -o arithmetic32.o arithmetic32.c
gcc -O2  -DNDEBUG  -c -o arithmetic64.o arithmetic64.c
gcc -O2  -DNDEBUG  -c -o bitmap.o bitmap.c
gcc -O2  -DNDEBUG  -c -o bsgs.o bsgs.c
gcc -O2  -DNDEBUG  -c -o clock.o clock.c
gcc -O2  -DNDEBUG  -c -o events.o events.c
gcc -O2  -DNDEBUG  -c -o factors.o factors.c
gcc -O2  -DNDEBUG  -c -o files.o files.c
gcc -O2  -DNDEBUG  -c -o global.o global.c
gcc -O2  -DNDEBUG  -c -o hashtable.o hashtable.c
gcc -O2  -DNDEBUG  -c -o primes.o primes.c
gcc -O2  -DNDEBUG  -c -o sequences.o sequences.c
gcc -O2  -DNDEBUG  -c -o subseq.o subseq.c
gcc -O2  -DNDEBUG  -c -o util.o util.c
gcc -s  srsieve.o arithmetic32.o arithmetic64.o bitmap.o bsgs.o clock.o events.o
 factors.o files.o global.o hashtable.o primes.o sequences.o subseq.o util.o  -l
m -o srsieve
arithmetic64.o:arithmetic64.c:(.text+0xccd): undefined reference to `_sqrtl'
arithmetic64.o:arithmetic64.c:(.text+0xcdc): undefined reference to `_sqrtl'
bsgs.o:bsgs.c:(.text+0x296): undefined reference to `_sqrtl'
collect2: ld returned 1 exit status
make: *** [srsieve] Error 1

JasonG@Jason-comp /temp
$
jasong is offline   Reply With Quote
Old 2007-03-11, 11:51   #6
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

5×701 Posts
Default

Quote:
Originally Posted by thommy View Post
why don't you try it first? do you even have and linux psp, or do you just wanna know?

cheers
It might NOT be a Linux psp. Preparing the computer to compile files took about 3 hours, though most of that time was taken up by running a script made specifically for compiling programs for the PSP.
jasong is offline   Reply With Quote
Old 2007-03-12, 03:37   #7
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default

Quote:
Originally Posted by jasong View Post
This is what I get when I type make:
Code:
$
arithmetic64.o:arithmetic64.c:(.text+0xccd): undefined reference to `_sqrtl'
sqrtl() is a standard C99 library function, it should be included by -lm.

You could try running `make CFLAGS=-ffast-math' to try to get GCC to use the built-in version of sqrtl() instead of the library version.

Otherwise it is probably safe to replace each occurance of `sqrtl' with `sqrt' in bsgs.c and arithmetic64.c provided none of your sequences k*b^n+c have k or |c| greater than 2^52.

edit: BTW it would be a good idea to add -Wall to the CFLAGS too. Run `make CFLAGS=-Wall' or `make CFLAGS="-Wall -ffast-math"' to do this.

Last fiddled with by geoff on 2007-03-12 at 03:42
geoff is offline   Reply With Quote
Old 2007-03-12, 23:33   #8
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

350510 Posts
Default

also, could someone show me how to make it work for a specific base? I've been able to build srsieve, but not sr5sieve.
jasong is offline   Reply With Quote
Old 2007-03-13, 00:31   #9
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default

Quote:
Originally Posted by jasong View Post
also, could someone show me how to make it work for a specific base? I've been able to build srsieve, but not sr5sieve.
The sr5sieve source is in a seperate archive from the srsieve source, but the compilation instructions are similar. Running `make' will compile a binary that should work on the host machine. If you have the GMP libraries installed, run `make check' too.

By default the base is 5. To compile for base 2, edit sr5sieve.h and change the line `#define BASE 5' to `#define BASE 2'. The executable will be called sr5sieve whatever base was set, so best to rename it immediately to avoid confusion :-)

sr5sieve doesn't use the sqrtl() function, so hopefully no need for further editing.
geoff is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mprime and mfakto on Playstation 4 0PolarBearsHere Hardware 2 2015-12-15 17:29
Prime95 on Playstation Portable jasong Software 4 2007-03-12 07:15
Sieving on Playstation 3 jasong Factoring 2 2007-01-02 00:38
Playstation 3 as cruncher discussion. jasong Hardware 1 2006-09-09 13:48
Is GIMPS program portable? Chris Software 5 2005-04-17 18:25

All times are UTC. The time now is 18:08.

Tue Oct 20 18:08:47 UTC 2020 up 40 days, 15:19, 1 user, load averages: 1.76, 2.10, 2.21

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.