mersenneforum.org  

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

Reply
 
Thread Tools
Old 2008-04-04, 00:18   #1
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3·17·59 Posts
Default Compiling Phrot

One more thing, although the test results are from LLR, I have finally been able to build and run phrot on a Core 2 Duo.

phrot is about 33% faster than LLR for bases that are not powers of 2. LLR is still king (by a long shot) for bases that are powers of 2. phrot can produce residues that are compatible with LLR, so PRP tests with phrot are valid. I have run a number of tests and have verified that it is running correctly. I'm switching over to it as I write this.

BTW, I haven't tested this on a P4, but I think it would have similar results. If anyone needs help setting it up, let me know. BTW, I have made a couple of changes to Phil's latest version of phrot that might be useful to anyone choosing to go that route.

Last fiddled with by rogue on 2008-04-04 at 00:27
rogue is offline   Reply With Quote
Old 2008-04-04, 01:44   #2
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

141418 Posts
Default

Quote:
Originally Posted by rogue View Post
One more thing, although the test results are from LLR, I have finally been able to build and run phrot on a Core 2 Duo.

phrot is about 33% faster than LLR for bases that are not powers of 2. LLR is still king (by a long shot) for bases that are powers of 2. phrot can produce residues that are compatible with LLR, so PRP tests with phrot are valid. I have run a number of tests and have verified that it is running correctly. I'm switching over to it as I write this.

BTW, I haven't tested this on a P4, but I think it would have similar results. If anyone needs help setting it up, let me know. BTW, I have made a couple of changes to Phil's latest version of phrot that might be useful to anyone choosing to go that route.
Could you please email me your Core 2 Duo-optimized version of phrot? My email address is bugmesticky AT googlemail DOT com (yes, googlemail not gmail--I figured I'd clear that up at the start since people have gotten confused with that before. It's actually just an alternate domain for Gmail that I, for some wacky reason, was assigned an address from.).

Thanks!

P.S.: Your build of phrot for Core 2 Duo, is it by any chance a Linux build? I'd actually prefer a Linux build, as my Core 2 Duo runs Ubuntu, though a Windows build would be find, if that's all you've got.

Last fiddled with by mdettweiler on 2008-04-04 at 01:46
mdettweiler is offline   Reply With Quote
Old 2008-04-04, 01:50   #3
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17·251 Posts
Default

Quote:
Originally Posted by Anonymous View Post
My email address is bugmesticky AT googlemail DOT com (yes, googlemail not gmail--I figured I'd clear that up at the start since people have gotten confused with that before. It's actually just an alternate domain for Gmail that I, for some wacky reason, was assigned an address from.).
Have you tried if using gmail.com works? Try sending yourself a message at bugmesticky at gmail dot com. I know that for my Gmail account, which is by default tim.sorbera at gmail dot com, I can even send it to something like t.i.m.s.o.r.b.era+76bda764fjuyg2 at googlemail dot com and still receive it.
http://en.wikipedia.org/wiki/Gmail#Addresses
It seems that googlemail.com is supposed to be for if you're in UK or Germany...I don't know why it gave you that.
Mini-Geek is offline   Reply With Quote
Old 2008-04-04, 01:57   #4
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

792 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Have you tried if using gmail.com works? Try sending yourself a message at bugmesticky at gmail dot com. I know that for my Gmail account, which is by default tim.sorbera at gmail dot com, I can even send it to something like t.i.m.s.o.r.b.era+76bda764fjuyg2 at googlemail dot com and still receive it.
http://en.wikipedia.org/wiki/Gmail#Addresses
It seems that googlemail.com is supposed to be for if you're in UK or Germany...I don't know why it gave you that.
Okay, I'll try that. You're right, it should work, last time I checked the MX records matched.

As for the googlemail.com thing--actually, even though I'm in the United States, I think I know why I got that address, after reading the Wikipedia link you pointed me to. You see, I got the address shortly before Google removed the requirement that you first be invited by an existing member; I had received my invite from a Gmail-invite-spooler website (sort of like one of those "take a penny-leave a penny" things you see at stores, just for Gmail invites instead), so most likely, the invite that I happened to draw from the system had been donated by someone in the UK or Germany.

Thus, conversely, when I put some spare invites back into the system after I had received my account, when I started getting messages saying "so-and-so has responded to your Google Mail invitation", the users were all listed with gmail.com addresses--because I had defined my country as USA when I signed up.

But yes, anyway, thanks for the link and the tips--I'll be sure to try it!

Edit: Well, I tried sending myself a message at bugmesticky AT gmail DOT com, and it worked! So, I guess either one will work fine.

Last fiddled with by mdettweiler on 2008-04-04 at 02:00
mdettweiler is offline   Reply With Quote
Old 2008-04-04, 12:32   #5
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

178216 Posts
Default

Quote:
Originally Posted by Anonymous View Post
Could you please email me your Core 2 Duo-optimized version of phrot? My email address is bugmesticky AT googlemail DOT com (yes, googlemail not gmail--I figured I'd clear that up at the start since people have gotten confused with that before. It's actually just an alternate domain for Gmail that I, for some wacky reason, was assigned an address from.).

Thanks!

P.S.: Your build of phrot for Core 2 Duo, is it by any chance a Linux build? I'd actually prefer a Linux build, as my Core 2 Duo runs Ubuntu, though a Windows build would be find, if that's all you've got.
I have found that compiler options vary depending upon the OS and version of gcc. I built the one I'm using with gcc 4 on MacIntel. I have also built with gcc 3.3 under Cygwin, but haven't timed that build. The compiler options were completely different.

I suggest that you start with a d/l of glucas and run the configure script. I can post the compiler options I've used along with the yeafft_defines.h and a small code change to glucas later today. I will also post my version of phrot source.

One major different between phrot and LLR is that phrot does not save intermediate results. If you stop a test in the middle, you will have to redo the entire test when you restart.
rogue is offline   Reply With Quote
Old 2008-04-04, 16:39   #6
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

792 Posts
Default

Quote:
Originally Posted by rogue View Post
I have found that compiler options vary depending upon the OS and version of gcc. I built the one I'm using with gcc 4 on MacIntel. I have also built with gcc 3.3 under Cygwin, but haven't timed that build. The compiler options were completely different.

I suggest that you start with a d/l of glucas and run the configure script. I can post the compiler options I've used along with the yeafft_defines.h and a small code change to glucas later today. I will also post my version of phrot source.

One major different between phrot and LLR is that phrot does not save intermediate results. If you stop a test in the middle, you will have to redo the entire test when you restart.
Okay. I already had a copy of the latest version of phrot as found here in the forum, which I'd noticed doesn't save the intermediate results as you said--I was wondering whether that was one of your "small modifications" that you made, I guess not.

Anyway, though, thanks for the tips--I'll be sure to do all then as soon as you can send me the source for phrot.
mdettweiler is offline   Reply With Quote
Old 2008-04-04, 18:12   #7
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×3×17×59 Posts
Default

Quote:
Originally Posted by Anonymous View Post
Okay. I already had a copy of the latest version of phrot as found here in the forum, which I'd noticed doesn't save the intermediate results as you said--I was wondering whether that was one of your "small modifications" that you made, I guess not.

Anyway, though, thanks for the tips--I'll be sure to do all then as soon as you can send me the source for phrot.
I don't recall all of the changes I made. I know that I did add an ini file so that it knows which line was the last line it processed. I also added an unrolled version of the modular reduction code that gives a 15% speed-up on PowerPC. There is no speed-up on x86 as the unrolled code is geared towards RISC CPUs. I also added reverse video (as I did for command line LLR) so that PRPs can easily been seen when scrolling through the terminal.

I believe that I also modified the Makefile to build two versions, one with and one without -DERRCHECK. I think I also added a -o option to write the results to an output file in addition to stdout. The -DERRCHECK is only needed when using bases that are powers of 2.
rogue is offline   Reply With Quote
Old 2008-04-04, 18:15   #8
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

792 Posts
Default

Quote:
Originally Posted by rogue View Post
I don't recall all of the changes I made. I know that I did add an ini file so that it knows which line was the last line it processed. I also added an unrolled version of the modular reduction code that gives a 15% speed-up on PowerPC. There is no speed-up on x86 as the unrolled code is geared towards RISC CPUs. I also added reverse video (as I did for command line LLR) so that PRPs can easily been seen when scrolling through the terminal.

I believe that I also modified the Makefile to build two versions, one with and one without -DERRCHECK. I think I also added a -o option to write the results to an output file in addition to stdout. The -DERRCHECK is only needed when using bases that are powers of 2.
Okay, cool--the ini file will make it MUCH more user friendly!
mdettweiler is offline   Reply With Quote
Old 2008-04-04, 18:21   #9
tnerual
 
tnerual's Avatar
 
Oct 2006

25910 Posts
Default

Quote:
Originally Posted by rogue View Post
One more thing, although the test results are from LLR, I have finally been able to build and run phrot on a Core 2 Duo.

phrot is about 33% faster than LLR for bases that are not powers of 2. LLR is still king (by a long shot) for bases that are powers of 2. phrot can produce residues that are compatible with LLR, so PRP tests with phrot are valid. I have run a number of tests and have verified that it is running correctly. I'm switching over to it as I write this.

BTW, I haven't tested this on a P4, but I think it would have similar results. If anyone needs help setting it up, let me know. BTW, I have made a couple of changes to Phil's latest version of phrot that might be useful to anyone choosing to go that route.
just for info: using phil's last version on base 6 (anonymous: it's a fast test, gary have all residues to compare with the llrnet output), i have timings up to 2,8 times faster (processor: centrino duo, same test, one core with llr one with phrot)

phrot seems extremely fast with amd and "old fashioned" intel ... (or more precisely, LLR sucks with these processors)

Last fiddled with by tnerual on 2008-04-04 at 18:22
tnerual is offline   Reply With Quote
Old 2008-04-04, 18:34   #10
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

792 Posts
Default

Quote:
Originally Posted by tnerual View Post
just for info: using phil's last version on base 6 (anonymous: it's a fast test, gary have all residues to compare with the llrnet output), i have timings up to 2,8 times faster (processor: centrino duo, same test, one core with llr one with phrot)

phrot seems extremely fast with amd and "old fashioned" intel ... (or more precisely, LLR sucks with these processors)
Yeah, Gary had forwarded to me your instructions and go.bat file for using phrot. I had to run it in a Windows virtual machine, though (my primary machine runs Ubuntu), so that would have thrown off any speed boosts. As soon as I can get the modified source from rogue, though, I'll try building it for Linux using his instructions--then I should be able to reap the full speed benefits.
mdettweiler is offline   Reply With Quote
Old 2008-04-04, 22:25   #11
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3·17·59 Posts
Default

I have attached the latest. Don't forget to apply the patch described here.

On a MacIntel Core 2 Duo with gcc 4, I have the following options in glucas/src/Makefile:

CFLAGS = -m64 -O3 -mtune=nocona -msse2 -msse3 -DNO_HACK_ALIGN -DY_DEFINES_FILE
CFLAGS0 = -m64 -mtune=nocona -msse2 -msse3 -DNO_HACK_ALIGN -DY_DEFINES_FILE

yeafft_defines.h is
#define Y_AVAL 4
#define Y_BLOCKSIZE 4096
#define Y_SHIFT 3

I use the same compile options for glprov.c

Finally, for those of you on AMD, try adding -DUNROLLED_MR to the glprov Makefile and do some tests to see if you get better tims.
Attached Files
File Type: zip glprov.zip (34.9 KB, 127 views)
rogue 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 14:42.

Mon Nov 30 14:42:46 UTC 2020 up 81 days, 11:53, 3 users, load averages: 1.39, 1.42, 1.49

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.