mersenneforum.org  

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

Reply
 
Thread Tools
Old 2021-10-09, 22:09   #573
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·5·647 Posts
Default

Quote:
Originally Posted by pepi37 View Post
If I use srsieve2 to sieve k*10^n-1 why is reported k*10^n+c?
Maybe it is just simple error, or something deeper?
Missing a % in a format string. It should be "%+c" and is just "+c" in the code. I have fixed and committed that fix.

Last fiddled with by rogue on 2021-10-09 at 22:11
rogue is offline   Reply With Quote
Old 2021-10-11, 17:48   #574
matzetoni
 
matzetoni's Avatar
 
Feb 2019

2×47 Posts
Default

Code:
>> gfndsieve.exe -k5000000 -K6000000 -n16001 -N17000 -o"out_test.txt"                                     
gfndsieve v2.0, a program to find factors of k*2^n+1 numbers for variable k and n                                       
Sieve started: 3 < p < 2^62 with 500000000 terms (5000001 <= k <= 5999999, 16001 <= n <= 17000,  k*2^n+1)                
 Fatal Error:  Invalid factor: 5006169*2^16953+1 mod 5012429 = 2651427
I got this error when using mtsieve_2.2.1
There is no error when using the same command with mtsieve_2.0.3
matzetoni is offline   Reply With Quote
Old 2021-10-11, 19:12   #575
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×5×647 Posts
Default

Quote:
Originally Posted by matzetoni View Post
Code:
>> gfndsieve.exe -k5000000 -K6000000 -n16001 -N17000 -o"out_test.txt"                                     
gfndsieve v2.0, a program to find factors of k*2^n+1 numbers for variable k and n                                       
Sieve started: 3 < p < 2^62 with 500000000 terms (5000001 <= k <= 5999999, 16001 <= n <= 17000,  k*2^n+1)                
 Fatal Error:  Invalid factor: 5006169*2^16953+1 mod 5012429 = 2651427
I got this error when using mtsieve_2.2.1
There is no error when using the same command with mtsieve_2.0.3
I will look into this.
rogue is offline   Reply With Quote
Old 2021-10-11, 21:46   #576
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

10010111000102 Posts
Default

Quote:
Originally Posted by matzetoni View Post
Code:
>> gfndsieve.exe -k5000000 -K6000000 -n16001 -N17000 -o"out_test.txt"                                     
gfndsieve v2.0, a program to find factors of k*2^n+1 numbers for variable k and n                                       
Sieve started: 3 < p < 2^62 with 500000000 terms (5000001 <= k <= 5999999, 16001 <= n <= 17000,  k*2^n+1)                
 Fatal Error:  Invalid factor: 5006169*2^16953+1 mod 5012429 = 2651427
I got this error when using mtsieve_2.2.1
There is no error when using the same command with mtsieve_2.0.3
Are you working on Fermat factors research?
ET_ is online now   Reply With Quote
Old 2021-10-22, 16:54   #577
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

145068 Posts
Default

I have posted mtsieve 2.2.2 over at sourceforge. It addresses the open issues and has these changes:

Code:
   framework:
      Added __attribute__ to method declarations that accept variable arguments.

   srsieve2, srsieve2cl:  version 1.5.3
      Modified to not remove terms that are prime as that defeats the purpose of Sierpinski/Riesel searches.
      Fixed bug where maxn for a sequence has a small factor, but it is not found.

   gnfdsieve, gfndsievecl:  version 2.1
      Fixed bug where code can find invalid factors.
rogue is offline   Reply With Quote
Old 2021-10-23, 09:30   #578
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

12E216 Posts
Default

Quote:
Originally Posted by rogue View Post
I have posted mtsieve 2.2.2 over at sourceforge. It addresses the open issues and has these changes:

Code:
   framework:
      Added __attribute__ to method declarations that accept variable arguments.

   srsieve2, srsieve2cl:  version 1.5.3
      Modified to not remove terms that are prime as that defeats the purpose of Sierpinski/Riesel searches.
      Fixed bug where maxn for a sequence has a small factor, but it is not found.

   gnfdsieve, gfndsievecl:  version 2.1
      Fixed bug where code can find invalid factors.
Can Linux users acess to the source code and recompile?
ET_ is online now   Reply With Quote
Old 2021-10-23, 14:06   #579
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2·5·647 Posts
Default

Quote:
Originally Posted by ET_ View Post
Can Linux users acess to the source code and recompile?
All of the source is on sourceforge as well as a makefile that works on OS X and Windows. If the makefile doesn't work on Linux, I would not expect it to be difficult to get it to work.
rogue is offline   Reply With Quote
Old 2021-10-23, 16:13   #580
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2×2,417 Posts
Default

Quote:
Originally Posted by rogue View Post
All of the source is on sourceforge as well as a makefile that works on OS X and Windows. If the makefile doesn't work on Linux, I would not expect it to be difficult to get it to work.
Thank you Mark. I will look for it better.
ET_ is online now   Reply With Quote
Old 2021-10-25, 15:56   #581
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

33610 Posts
Default

Is there advice about how to best choose values for "-G", "-g" and "-W' for OpenCL based programs like srsieve2cl on a given GPU?

On a Tesla A100, I couldn't get srsieve2cl to go much above 9 to 10M p/sec, after fiddling with values for a while. By comparison, a plain ./srsieve2 -W 48 on a 72-core Xeon CPU gives me about 15M p/sec.
ryanp is online now   Reply With Quote
Old 2021-10-25, 16:24   #582
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

2×5×647 Posts
Default

Quote:
Originally Posted by ryanp View Post
Is there advice about how to best choose values for "-G", "-g" and "-W' for OpenCL based programs like srsieve2cl on a given GPU?

On a Tesla A100, I couldn't get srsieve2cl to go much above 9 to 10M p/sec, after fiddling with values for a while. By comparison, a plain ./srsieve2 -W 48 on a 72-core Xeon CPU gives me about 15M p/sec.
I recommend bumping -g. You will have to play around to see where you start seeing diminishing returns.

I have noticed that when running many workers that the code that feeds the worker threads is not fast enough. In some cases it is better to have multiple instances of srsieve2 running. To address this would require significant changes to the framework.
rogue is offline   Reply With Quote
Old 2021-10-25, 16:39   #583
ryanp
 
ryanp's Avatar
 
Jun 2012
Boulder, CO

24×3×7 Posts
Default

Quote:
Originally Posted by rogue View Post
I recommend bumping -g. You will have to play around to see where you start seeing diminishing returns.

I have noticed that when running many workers that the code that feeds the worker threads is not fast enough. In some cases it is better to have multiple instances of srsieve2 running. To address this would require significant changes to the framework.
I've tried a number of combinations of -G and -g, ranging from "-g 16" up to "-G 8 -g 288". No matter what, it always tops out around 9.7 or 9.8M p/sec.

This is pretty surprising (the A100 has a max 19.5 TFlop/s single precision) considering I can easily get higher than that with 48 workers on a Xeon.
ryanp is online now   Reply With Quote
Reply

Thread Tools


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


Sun Dec 5 11:06:58 UTC 2021 up 135 days, 5:35, 0 users, load averages: 1.36, 1.38, 1.75

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.