mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2010-08-31, 18:49   #23
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3×113 Posts
Default

Quote:
Originally Posted by rogue View Post
Since you are getting residues of 0's, then either phrot is built incorrectly or YEAFFT is built incorrectly. What compiler flags were used to build the YEAFFT library?
I followed the instructions in phrot readme file and I have used the yeafft of glucas. Remaking glucas I found these:

[...]
Code:
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O3  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'ynorm_16.c' || echo './'`ynorm_16.c
source='yeafft.c' object='yeafft.o' libtool=no \
depfile='.deps/yeafft.Po' tmpdepfile='.deps/yeafft.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O3  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'yeafft.c' || echo './'`yeafft.c
source='yeafft1.c' object='yeafft1.o' libtool=no \
depfile='.deps/yeafft1.Po' tmpdepfile='.deps/yeafft1.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O3  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'yeafft1.c' || echo './'`yeafft1.c
source='yeainit.c' object='yeainit.o' libtool=no \
depfile='.deps/yeainit.Po' tmpdepfile='.deps/yeainit.TPo' \
[...]

Maybe one of
-O3
-DY_MEM_THRESHOLD=8192
-DY_KILL_BRANCHES
-DY_VECTORIZE

can cause problems ?
pacionet is offline   Reply With Quote
Old 2010-08-31, 19:04   #24
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

603810 Posts
Default

Quote:
Originally Posted by pacionet View Post
I followed the instructions in phrot readme file and I have used the yeafft of glucas. Remaking glucas I found these:

Maybe one of
-O3
-DY_MEM_THRESHOLD=8192
-DY_KILL_BRANCHES
-DY_VECTORIZE

can cause problems ?
The -D values are specific to glucas and are unlikely to cause problems. -O3 could be a problem. Try rebuilding with -O1, then rebuild phrot and see what happens. If -O1 works, then try -O2 and do it again.
rogue is offline   Reply With Quote
Old 2010-08-31, 19:38   #25
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3·113 Posts
Default

Quote:
Originally Posted by rogue View Post
The -D values are specific to glucas and are unlikely to cause problems. -O3 could be a problem. Try rebuilding with -O1, then rebuild phrot and see what happens. If -O1 works, then try -O2 and do it again.
I was not lucky.
Rebuilt yeafft with -O1

Code:
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'ynorm_16.c' || echo './'`ynorm_16.c
source='yeafft.c' object='yeafft.o' libtool=no \
depfile='.deps/yeafft.Po' tmpdepfile='.deps/yeafft.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'yeafft.c' || echo './'`yeafft.c
source='yeafft1.c' object='yeafft1.o' libtool=no \
depfile='.deps/yeafft1.Po' tmpdepfile='.deps/yeafft1.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'yeafft1.c' || echo './'`yeafft1.c
source='yeainit.c' object='yeainit.o' libtool=no \
depfile='.deps/yeainit.Po' tmpdepfile='.deps/yeainit.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.     -O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE -c `test -f 'yeainit.c' || echo './'`yeainit.c
source='radix_2.c' object='radix_2.o' libtool=no \
depfile='.deps/radix_2.Po' tmpdepfile='.deps/radix_2.TPo' \
and phrot

Code:
gcc -maix64 -lm -lpthread  -Wall \
 \
-o phrot.g5 \
phrot.c \
-O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE \
-I../glucas ../glucas/libyeafft.a
Same wrong result ... with residues with a lot of zeros:

Code:
phrot.g5 -q 5028*10^83982+1
sizeof(int64)=8
Phil Carmody's Phrot (0.72)

Input 5028*10^83982+1 :  Actually testing 5028*1000000^13997+1 (witness=3 13998/28672 limbs)
5028*10^83982+1 is composite LLR64=0000000000000000. (e=0.00098 (0.0824785~8.27893e-18@0.000) t=173.92s)
Code:
bash-3.2$ phrot.g5 -q 56093*36^58139-1
sizeof(int64)=8
Phil Carmody's Phrot (0.72)
Input 56093*36^58139-1 :  Actually testing 72696528*46656^19379-1 (witness=3 19381/40960 limbs)
56093*36^58139-1 is composite LLR64=0000000000000000. (e=0.00047 (0.00021126~1.53918e-15@0.000) t=267.87s)

On the other hand glucas seems to work

Code:
[Thu Aug 26 19:53:09 2010]
bash-3.2$ glucas 23209
Going to work with exponent 23209
Starting from iteration 1. Exponent 23209.
M23209. Saved file at iteration 4096. Res64: 60DD379FEFC017FE.
M23209. Saved file at iteration 8192. Res64: 57B014FAC6BAED3A.
Iter. 10000 ( 43.09%), Err= 0.086, 0.35 user  52% CPU (0.000 sec/iter).
M23209. Saved file at iteration 12288. Res64: 92B6CB2BE3CD9ECE.
M23209. Saved file at iteration 16384. Res64: 5322CA8405A26B7B.
Iter. 20000 ( 86.18%), Err= 0.078, 0.35 user  52% CPU (0.000 sec/iter).
M23209. Saved file at iteration 20480. Res64: 4EAA7F09C57C7B75.
[Tue Aug 31 21:24:56 2010]
M23209 is a known Mersenne prime!
Code:
bash-3.2$ glucas 216091
M216091. Saved file at iteration 167936. Res64: 65DAC3959C92014B.
Iter. 170000 ( 78.67%), Err= 0.000, 6.25 user 100% CPU (0.001 sec/iter).
M216091. Saved file at iteration 172032. Res64: 82AC0AEF60948C69.
M216091. Saved file at iteration 176128. Res64: 95582DC8C101C4E9.
Iter. 180000 ( 83.30%), Err= 0.000, 6.25 user 100% CPU (0.001 sec/iter).
M216091. Saved file at iteration 180224. Res64: DA6BE8F46193EDFC.
M216091. Saved file at iteration 184320. Res64: 4C0C54F6B3BB5100.
M216091. Saved file at iteration 188416. Res64: 406A52E8ECC1101E.
Iter. 190000 ( 87.93%), Err= 0.000, 6.26 user 100% CPU (0.001 sec/iter).
M216091. Saved file at iteration 192512. Res64: DD896660D12E8357.
M216091. Saved file at iteration 196608. Res64: BCFE65FA0F9F4778.
Iter. 200000 ( 92.55%), Err= 0.000, 6.25 user 100% CPU (0.001 sec/iter).
M216091. Saved file at iteration 200704. Res64: F4E92A3E32F77E9F.
M216091. Saved file at iteration 204800. Res64: 78897F6C7A3E982E.
M216091. Saved file at iteration 208896. Res64: 1007948E422A60B9.
Iter. 210000 ( 97.18%), Err= 0.000, 6.26 user 100% CPU (0.001 sec/iter).
M216091. Saved file at iteration 212992. Res64: 240FD3A839CB978D.
[Tue Aug 31 21:35:15 2010]
M216091 is a known Mersenne prime!
pacionet is offline   Reply With Quote
Old 2010-08-31, 19:42   #26
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×3,019 Posts
Default

Interesting. Can you remove the -maix64 setting from the build of phrot and see what happens? Which version of gcc is installed?

Beyond that I would need to run your build of phrot with a debugger.
rogue is offline   Reply With Quote
Old 2010-08-31, 23:56   #27
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3×113 Posts
Default

Nice ...

without the -maix64 flag it seems to work

PRP:

Code:
phrot.g5 -q 5028*10^83982+1
sizeof(int64)=8
Phil Carmody's Phrot (0.72)

Input 5028*10^83982+1 :  Actually testing 5028*1000000^13997+1 (witness=3 13998/28672 limbs)
5028*10^83982+1 is PRP. (e=0.05469 (0.0824785~4.62227e-16@0.000) t=450.37s)
Known residue:

Code:
phrot.g5 -q 56093*36^58139-1

RES64: [00BFD059739B458C]

LLR64=00bfd059739b458c

Anyway, I remember that in all previous attempts (probably when libyeafft was compiled with -O3 ?) without -maix64 flag gcc complains and output some errors.

So, resuming, the final working configuration (flags) for me is:

Code:
YEAFFT: -O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE

PHROT: gcc -lm -lpthread  -Wall -o phrot.g5 phrot.c \
-O1  -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES -DY_VECTORIZE \
-I../glucas ../glucas/libyeafft.a

Thanks
pacionet is offline   Reply With Quote
Old 2010-09-01, 00:56   #28
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3,019 Posts
Default

Definitely try to get -O2 working, maybe YEAFFT with -O2 and phrot with -O1 or vice versa. You probably won't get to the 133 seconds (vs. 450) for that test, but if you can regain even 50% of the speed, then your efforts will be worth it.

Before you participate in any projects, I strongly recommend that you run through the provided tests and do a bunch of those base 36 composite tests. If all tests have correct results, then you are good to go. If you still have a bad build, then a lot of the work you do for projects will be suspect and possibly tossed.
rogue is offline   Reply With Quote
Old 2010-09-01, 14:02   #29
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3·113 Posts
Default

Quote:
Originally Posted by rogue View Post
Definitely try to get -O2 working, maybe YEAFFT with -O2 and phrot with -O1 or vice versa. You probably won't get to the 133 seconds (vs. 450) for that test, but if you can regain even 50% of the speed, then your efforts will be worth it.

Before you participate in any projects, I strongly recommend that you run through the provided tests and do a bunch of those base 36 composite tests. If all tests have correct results, then you are good to go. If you still have a bad build, then a lot of the work you do for projects will be suspect and possibly tossed.
Before joining any project , I think I should try to install a sieve on the same machine. Any suggests ?
pacionet is offline   Reply With Quote
Old 2010-09-01, 15:36   #30
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·3,019 Posts
Default

Quote:
Originally Posted by pacionet View Post
Before joining any project , I think I should try to install a sieve on the same machine. Any suggests ?
d/l Geoff Reynold's srsieve programs and build them. They have some PPC code in them, but you might need to modify the makefile and some sources to use it.
rogue is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mac software? miumiu2134 Software 1 2013-05-29 10:22
Best Software? Unregistered Homework Help 0 2008-10-07 01:00
New forum software... Xyzzy Forum Feedback 61 2006-01-03 18:19
Software TTn PSearch 0 2004-05-04 13:16
New software... Xyzzy Lounge 112 2003-10-16 13:23

All times are UTC. The time now is 11:07.

Thu Dec 3 11:07:16 UTC 2020 up 7:18, 0 users, load averages: 1.27, 0.99, 1.01

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.