mersenneforum.org  

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

Reply
 
Thread Tools
Old 2008-04-04, 22:41   #12
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

11000011010012 Posts
Default

Quote:
Originally Posted by rogue View Post
I have attached the latest. Don't forget to apply the patch described here.
<snip>
Hmm...I can't quite figure out where to insert that code into the yeainit.c file. (I have absolutely no knowledge of C or any of its derivatives.) Can you possibly attach at patched version of yeainit.c?

Last fiddled with by mdettweiler on 2008-04-04 at 22:42
mdettweiler is offline   Reply With Quote
Old 2008-04-04, 23:21   #13
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11·577 Posts
Default

Quote:
Originally Posted by Anonymous View Post
Hmm...I can't quite figure out where to insert that code into the yeainit.c file. (I have absolutely no knowledge of C or any of its derivatives.) Can you possibly attach at patched version of yeainit.c?
Modify this:
Code:
y_size_t y_init(y_size_t n)
{
y_size_t i = (1L << (sizeof(y_size_t) * 8 - 2)), j,
k = sizeof(y_size_t) * 8 - 1, old = Y_LENGTH;
to look like this:
Code:
y_size_t y_init(y_size_t n)
{
n+=(n&1); /* round up to even, as we must be even sized */

y_size_t i = (1L << (sizeof(y_size_t) * 8 - 2)), j,
k = sizeof(y_size_t) * 8 - 1, old = Y_LENGTH;
rogue is offline   Reply With Quote
Old 2008-04-05, 01:34   #14
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by rogue View Post
Modify this:
Code:
y_size_t y_init(y_size_t n)
{
y_size_t i = (1L << (sizeof(y_size_t) * 8 - 2)), j,
k = sizeof(y_size_t) * 8 - 1, old = Y_LENGTH;
to look like this:
Code:
y_size_t y_init(y_size_t n)
{
n+=(n&1); /* round up to even, as we must be even sized */

y_size_t i = (1L << (sizeof(y_size_t) * 8 - 2)), j,
k = sizeof(y_size_t) * 8 - 1, old = Y_LENGTH;
Okay, I was able to modify the source as per your instructions, and build Glucas, but I can't quite figure out how to build phrot itself. I tried executing the command "make" from within the glprov directory (I put the glprov and glucas directories within the same directory), but I get the following error messages:
Code:
Makefile:1: ../Make.inc: No such file or directory
make: *** No rule to make target `../Make.inc'.  Stop.
Where did I go wrong?
mdettweiler is offline   Reply With Quote
Old 2008-04-05, 03:15   #15
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11·577 Posts
Default

Quote:
Originally Posted by Anonymous View Post
Okay, I was able to modify the source as per your instructions, and build Glucas, but I can't quite figure out how to build phrot itself. I tried executing the command "make" from within the glprov directory (I put the glprov and glucas directories within the same directory), but I get the following error messages:
Code:
Makefile:1: ../Make.inc: No such file or directory
make: *** No rule to make target `../Make.inc'.  Stop.
Where did I go wrong?
Make.inc is just a file that is in the parent directory of the folder that has the glprov source. In mine I have:

Code:
CC_OPT=-O3 -mtune-nocona -msse2 -msse2 -m64
HOSTTYPE=c2d
PHILMATH=/Distributed/phil
Change PHILMATH to be the folder that contains the glprov folder.

I have attached a zip file that you will need to build an additional library needed by the phrot makefile. Put it at the same level as the glprov folder. You will need to use "make" in the libs folder, then you should be able to make phrot.

I assume you changed YEALIB in the phrot Makefile to point to your glucas installation. You should also change this line:

YEACFLAGS:=${CC_OPT32} -fnested-functions

to this:

YEACFLAGS:=${CC_OPT}

-fnested-functions should have no affect on the build. You might want to change this line:

OPT:=-O2 -ffast-math

to

OPT:=-O3

and compare the results.
Attached Files
File Type: zip libs.zip (27.8 KB, 155 views)

Last fiddled with by rogue on 2008-04-05 at 03:19
rogue is offline   Reply With Quote
Old 2008-04-05, 04:57   #16
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3×2,083 Posts
Default

Quote:
Originally Posted by rogue View Post
Make.inc is just a file that is in the parent directory of the folder that has the glprov source. In mine I have:

Code:
CC_OPT=-O3 -mtune-nocona -msse2 -msse2 -m64
HOSTTYPE=c2d
PHILMATH=/Distributed/phil
Change PHILMATH to be the folder that contains the glprov folder.

I have attached a zip file that you will need to build an additional library needed by the phrot makefile. Put it at the same level as the glprov folder. You will need to use "make" in the libs folder, then you should be able to make phrot.
When I run "make" from the libs folder, I get the following error:
Code:
max@max:~/Documents/prime-searching/phrot/libs$ make
gcc -O3 -mtune-nocona -msse2 -msse2 -m64 -O3 -o math52.c2d.o -c math52.c
cc1: error: unrecognized command line option "-mtune-nocona"
make: *** [math52.c2d.o] Error 1
Am I using a wrong version of gcc or something? (As far as I know, I have the latest version--I'm running Ubuntu 8.04 beta with everything up to date.)
Quote:
I assume you changed YEALIB in the phrot Makefile to point to your glucas installation. You should also change this line:

YEACFLAGS:=${CC_OPT32} -fnested-functions

to this:

YEACFLAGS:=${CC_OPT}

-fnested-functions should have no affect on the build.
Actually, in the makefile I found in the phrot folder, I don't see any "-fnewsted-functions" thing at all--it instead said "YEACFLAGS:=${CC_OPT32_DEBUG}". So, I just left it as it was.

Quote:
You might want to change this line:

OPT:=-O2 -ffast-math

to

OPT:=-O3

and compare the results.
I didn't see that in the glprov makefile either. Am I looking in the wrong place?

I must confess that I know essentially nil about C/C++, and am not very experienced in compiling things from source--I've compiled software from source before, but have never had to mess with editing things in makefiles and whatnot, so this is all new to me.
mdettweiler is offline   Reply With Quote
Old 2008-04-05, 11:48   #17
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11×577 Posts
Default

I guess I zipped up a different Makefile than I thought. Use CC_OPT instead of CC_OPT32_DEBUG.

It should be -mtune=nocona, not -mtune-nocona. Sorry about that.
rogue is offline   Reply With Quote
Old 2008-04-05, 18:03   #18
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11·577 Posts
Default

Quote:
Originally Posted by em99010pepe View Post
A few results from my AMD 64 3000+:

So for your P4 you will get half the time.
Based upon the timings I see, I highly recommend that you run phrot instead of LLR. Read this link for more info.
rogue is offline   Reply With Quote
Old 2008-04-05, 18:05   #19
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

11·577 Posts
Default

One last note for those of you using phrot. You need to specify the -b3 and -o options when you run it. -b3 will write output residues that are compatible with LLR. -o will write those residues to a file in addition to what is written to the terminal. This file can then be sent when you complete your range.

Finally, if enough people start to use phrot, someone should consider supporting phrot with LLRNet.
rogue is offline   Reply With Quote
Old 2008-04-05, 18:10   #20
em99010pepe
 
em99010pepe's Avatar
 
Sep 2004

2·5·283 Posts
Default

Quote:
Originally Posted by rogue View Post
Based upon the timings I see, I highly recommend that you run phrot instead of LLR. Read this link for more info.
I am running LLRnet....is there a compiled version?

Last fiddled with by em99010pepe on 2008-04-05 at 18:13
em99010pepe is offline   Reply With Quote
Old 2008-04-05, 18:43   #21
Siemelink
 
Siemelink's Avatar
 
Jan 2006
Hungary

10C16 Posts
Default

Quote:
Originally Posted by rogue View Post
One last note for those of you using phrot. You need to specify the -b3 and -o options when you run it. -b3 will write output residues that are compatible with LLR. -o will write those residues to a file in addition to what is written to the terminal. This file can then be sent when you complete your range.

Finally, if enough people start to use phrot, someone should consider supporting phrot with LLRNet.
Interesting stuff! Given that I do millions of tests I want to try as well. But I can not compile at the moment. Does someone have a windows compile available?

Willem.
Siemelink is offline   Reply With Quote
Old 2008-04-05, 19:12   #22
tnerual
 
tnerual's Avatar
 
Oct 2006

4038 Posts
Default

Quote:
Originally Posted by Siemelink View Post
Interesting stuff! Given that I do millions of tests I want to try as well. But I can not compile at the moment. Does someone have a windows compile available?

Willem.
here is how to do the stuff under windows ...

Quote:
1. download phrot here:
http://www.mersenneforum.org/attachm...8&d=1165306798

2. unzip files
3. change name of "phrot.0.5.cygp3" to "phrot.exe"
4. download cygwin1.dll here:
http://www.dll-files.com/dllindex/dl....shtml?cygwin1
5. uncompress cygwin1.dll in same directory as phrot
6. create a "totest.txt" file containing:
Code:
ABC $a*$b^$c+1
1 2 3
4 5 6
7 8 9
7. run phrot in a "dos windows":
Code:
phrot -b3 -o totest.txt

that's all
this will test 1*2^3+1 then 4*5^6+1 and 7*8^9+1 (edit totest.txt to match your needs)

can a moderator move this technical discussion out of this thread and create a new one just for phrot ?

Last fiddled with by tnerual on 2008-04-05 at 19:14 Reason: asking for move
tnerual is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PRPNET & Phrot discussion masser Sierpinski/Riesel Base 5 27 2010-09-08 03:10
Phrot announcements rogue Conjectures 'R Us 33 2010-01-22 19:39
LLR/PRP/phrot/pfgw:- Pick A Range masser Sierpinski/Riesel Base 5 8 2009-08-18 19:44
Using Phrot For LLRNET Reservations thommy Sierpinski/Riesel Base 5 1 2008-11-03 14:53
Programmer needed to write networked Phrot app! mdettweiler Programming 0 2008-04-07 21:25

All times are UTC. The time now is 09:14.


Sat Jul 17 09:14:01 UTC 2021 up 50 days, 7:01, 1 user, load averages: 1.69, 1.71, 1.63

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.