mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-08-31, 12:39   #12
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

5×7×167 Posts
Default

With the distribution there should be a few files that you can use to test your build.
rogue is offline   Reply With Quote
Old 2010-08-31, 12:52   #13
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3×113 Posts
Default

Quote:
Originally Posted by rogue View Post
With the distribution there should be a few files that you can use to test your build.
The first test, as written before, failed (test a proven prime).
I think the problem is in that type definition int64.

What definition I have to use ? The one in mathtypes.h or the one in /usr/lib/inttypes.h ? How should I modify the include statements ?

Last fiddled with by pacionet on 2010-08-31 at 12:52
pacionet is offline   Reply With Quote
Old 2010-08-31, 12:55   #14
ldesnogu
 
ldesnogu's Avatar
 
Jan 2008
France

24·3·11 Posts
Default

Quote:
Originally Posted by pacionet View Post
The first test, as written before, failed (test a proven prime).
I think the problem is in that type definition int64.

What definition I have to use ? The one in mathtypes.h or the one in /usr/lib/inttypes.h ? How should I modify the include statements ?
It should be 64-bit. Just print sizeof(int64) and check it's 8.
If it is 8, then your issue is somewhere else.
ldesnogu is offline   Reply With Quote
Old 2010-08-31, 13:38   #15
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3×113 Posts
Default

Quote:
Originally Posted by ldesnogu View Post
It should be 64-bit. Just print sizeof(int64) and check it's 8.
If it is 8, then your issue is somewhere else.
It's 8
(fprintf(stderr, "sizeof(int64)=%lu\n",sizeof(int64)); )

Code:
bash-3.2$ 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=0000000000000001. (e=0.00000 (0.0824785~0@0.000) t=76.88s)
pacionet is offline   Reply With Quote
Old 2010-08-31, 14:33   #16
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

5×7×167 Posts
Default

Do you have problems with other bases? What about k*b^n-1 numbers? What about base 2 numbers? What about composite numbers with known residues? Could you run a few more tests on numbers of these forms and let us know the result?
rogue is offline   Reply With Quote
Old 2010-08-31, 15:13   #17
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3·113 Posts
Default

I ran the tests in testm/abcm.in

Code:
phrot.g5 testm/abcm.in
sizeof(int64)=8
Phil Carmody's Phrot (0.72)
Input 10*1017^20086-1 :  Actually testing 10*1034289^10043-1 (witness=3 10044/20480 limbs)
10*1017^20086-1 is composite LLR64=0000000000000000. (e=0.00000 (0.0704057~0@0.000) t=63.10s)
Input 1000866867*10^5066-1 :  Actually testing 100086686700*1000^1688-1 (witness=3 1692/3584 limbs)
k>b^2 not supported for LLR residues
1000866867*10^5066-1 is composite LLR64=0000000000000000. (e=0.00000 (2.33299e-08~0@0.000) t=1.90s)
Input 10025*82^10025-1 :  Actually testing 67408100*551368^3341-1 (witness=3 3343/7168 limbs)
10025*82^10025-1 is composite LLR64=0000000000000000. (e=0.00000 (0.0107054~0@0.000) t=15.95s)
Input 1003509507*10^5066-1 :  Actually testing 100350950700*1000^1688-1 (witness=3 1692/3584 limbs)
k>b^2 not supported for LLR residues
1003509507*10^5066-1 is composite LLR64=0000000000000000. (e=0.00000 (2.33299e-08~0@0.000) t=1.90s)
Input 1004245242*10^2534-1 :  Actually testing 100424524200*1000^844-1 (witness=3 848/1792 limbs)
k>b^2 not supported for LLR residues
1004245242*10^2534-1 is composite LLR64=0000000000000000. (e=0.00000 (1.52791e-08~0@0.000) t=0.48s)
Input 1004521518*10^2541-1 :  Actually testing 10045215180*10000^635-1 (witness=3 638/1280 limbs)
k>b^2 not supported for LLR residues
1004521518*10^2541-1 is composite LLR64=0000000000000000. (e=0.00000 (1.23057e-06~0@0.000) t=0.34s)
Input 10056710664*10^5062-1 :  Actually testing 100567106640*1000^1687-1 (witness=3 1691/3584 limbs)
k>b^2 not supported for LLR residues
10056710664*10^5062-1 is composite LLR64=0000000000000000. (e=0.00000 (2.33216e-08~0@0.000) t=1.90s)
Input 1007731725*10^2536-1 :  Actually testing 1007731725*10000^634-1 (witness=3 637/1280 limbs)
k>b^2 not supported for LLR residues
1007731725*10^2536-1 is composite LLR64=0000000000000000. (e=0.00000 (1.22936e-06~0@0.000) t=0.34s)
Input 1008509502*10^5026-1 :  Actually testing 10085095020*1000^1675-1 (witness=3 1679/3584 limbs)
k>b^2 not supported for LLR residues
1008509502*10^5026-1 is composite LLR64=0000000000000000. (e=0.00000 (2.32207e-08~0@0.000) t=1.88s)
Input 100876776*10^2534-1 :  Actually testing 10087677600*10000^633-1 (witness=3 636/1280 limbs)
k>b^2 not supported for LLR residues
100876776*10^2534-1 is composite LLR64=0000000000000000. (e=0.00000 (1.22815e-06~0@0.000) t=0.34s)
Input 101029929*10^2558-1 :  Actually testing 10102992900*10000^639-1 (witness=3 642/1536 limbs)
k>b^2 not supported for LLR residues
101029929*10^2558-1 is composite LLR64=0000000000000000. (e=0.00000 (1.76749e-06~0@0.000) t=0.41s)
Base 2:

Code:
bash-3.2$ phrot.g5 -q 299*2^19752-1
sizeof(int64)=8
Phil Carmody's Phrot (0.72)

Current line of input doesn't matched checkpointed test.  Current test will be restarted
Input 299*2^19752-1 :  Actually testing 1224704*1048576^987-1 (witness=3 989/2048 limbs)
299*2^19752-1 is composite LLR64=0000000000000000. (e=0.00000 (0.0184696~0@0.000) t=1.27s)
I don't know where to find tests with known residues.

Last fiddled with by pacionet on 2010-08-31 at 15:20
pacionet is offline   Reply With Quote
Old 2010-08-31, 16:11   #18
ldesnogu
 
ldesnogu's Avatar
 
Jan 2008
France

10000100002 Posts
Default

Quote:
Originally Posted by pacionet View Post
It's 8
(fprintf(stderr, "sizeof(int64)=%lu\n",sizeof(int64)); )
So I'd say the definition of int64 is not the issue.

Are you sure yeafft is correctly compiled?

Another thing to try: remove -ffast-math.
ldesnogu is offline   Reply With Quote
Old 2010-08-31, 16:18   #19
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

5×7×167 Posts
Default

-ffast-math can definitely cause problems.

Follow this link to find some PFGW residues. If your build of phrot results in residues with lots of zeros, then the problem is with the build, most likely -ffast-math.

Since gcc varies slightly from platform to platform it could be another compiler option. I recommend using -O1 and removing all -f switches to see if it works. If it does, then use -O2, then -O3 or add -f switches one at a time to figure out which one is causing the problem.
rogue is offline   Reply With Quote
Old 2010-08-31, 16:47   #20
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3·113 Posts
Default

Without -ffast-math and with -O1:

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

The testm seems work:

Input 103914*4001^4001-1 : Actually testing 103914*4001^4001-1 (witness=3 4003/8192 limbs)
103914*4001^4001-1 is PRP. (e=0.00000 (6.28077e-07~3.53103e-16@0.000) t=15.16s)
Input 103951848*10^2555-1 : Actually testing 103951848*100000^511-1 (witness=3 513/1152 limbs)
103951848*10^2555-1 is PRP. (e=0.00005 (0.000150342~2.35792e-16@0.000) t=0.35s)
Input 1041845805*10^2562-1 : Actually testing 1041845805*1000^854-1 (witness=3 858/1792 limbs)
1041845805*10^2562-1 is PRP. (e=0.00000 (1.53901e-08~2.54359e-16@0.000) t=0.54s)
Input 104297193*10^5069-1 : Actually testing 1042971930*10000^1267-1 (witness=3 1270/2560 limbs)
104297193*10^5069-1 is PRP. (e=0.00000 (1.88708e-06~3.51235e-16@0.000) t=1.52s)


[...]

but this test fails:

Code:
bash-3.2$ 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=164.23s)
How can I test if the yeafft is correctly compiled ?

Other tests with composite and known residues (failed) (with the same options, ffast-math removed and O1)

56093*36^58139-1 is composite: RES64: [00BFD059739B458C]
My result: LLR64=0000000000000000.

56093*36^59413-1 is composite: RES64: [3A3314C49046512B]
My result: LLR64=0000000000000000

Last fiddled with by pacionet on 2010-08-31 at 17:00
pacionet is offline   Reply With Quote
Old 2010-08-31, 17:30   #21
pacionet
 
pacionet's Avatar
 
Oct 2005
Italy

3·113 Posts
Default

Others configuration (different compile flags), same (wrong) results:

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

Code:
gcc -maix64 -lm -lpthread  -Wall \
 \
-o phrot.g5 \
phrot.c \
-O1 -DY_MEM_THRESHOLD=8192 -DY_KILL_BRANCHES \
-I../glucas ../glucas/libyeafft.a
Code:
gcc -maix64 -lm -lpthread  -Wall \
 \
-o phrot.g5 \
phrot.c \
 \
-I../glucas ../glucas/libyeafft.a
Tell me I found a bug in IBM hardware and they'll give me some million dollars to keep it secret :))))))) !!!!

Last fiddled with by pacionet on 2010-08-31 at 17:34
pacionet is offline   Reply With Quote
Old 2010-08-31, 17:40   #22
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

133258 Posts
Default

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?
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 17:14.

Wed Aug 5 17:14:33 UTC 2020 up 19 days, 13:01, 1 user, load averages: 2.03, 1.76, 1.84

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.