mersenneforum.org FermFact
 Register FAQ Search Today's Posts Mark Forums Read

2017-12-22, 22:57   #12
rogue

"Mark"
Apr 2003
Between here and the

592410 Posts

I'm pleased to announce the alpha release of a GFN divisor sieving program that is not limited to Windows (like fermfact). Unfortunately at this time it is about 10 to 15% slower than fermfact (on Windows), but it can be compiled on other 64-bit x86 platforms. It generates output similar to the -abcd1d format from fermfact.

The simplest usage would be like the following:

Code:
gfndsieve87 -n1000 -N2000 -k10000 -K20000
which will continue sieving until you use ^C then write the terms to gfnd.pfgw. You can use additional parameters like -x (factor validation), -P to set the upper bound for sieving, or -o to change the output file name prefix.

There is a -T option, which is not tested, that will allow you to split the output into multiple files. This option specifies how many n you want per file which is helpful if you know that it will be generating hundreds of millions or billions of terms. I still have work to do to support restarting of sieving from an output file created by a previous execution of gnfdsieve. The code is there, but probably doesn't work.

If interested, give it a spin and let me know what you think.
Attached Files
 gfndsieve_1.0.0.7z (129.1 KB, 59 views)

2017-12-23, 12:10   #13
ET_
Banned

"Luigi"
Aug 2002
Team Italia

2·2,383 Posts

Quote:
 Originally Posted by rogue I'm pleased to announce the alpha release of a GFN divisor sieving program that is not limited to Windows (like fermfact). Unfortunately at this time it is about 10 to 15% slower than fermfact (on Windows), but it can be compiled on other 64-bit x86 platforms. It generates output similar to the -abcd1d format from fermfact. The simplest usage would be like the following: Code: gfndsieve87 -n1000 -N2000 -k10000 -K20000 which will continue sieving until you use ^C then write the terms to gfnd.pfgw. You can use additional parameters like -x (factor validation), -P to set the upper bound for sieving, or -o to change the output file name prefix. There is a -T option, which is not tested, that will allow you to split the output into multiple files. This option specifies how many n you want per file which is helpful if you know that it will be generating hundreds of millions or billions of terms. I still have work to do to support restarting of sieving from an output file created by a previous execution of gnfdsieve. The code is there, but probably doesn't work. If interested, give it a spin and let me know what you think.
Thank you Mike, we needed it It could be used in conjuntion with ppsieve and ppsieve-CUDA to have a multiplatform chain tool.

Code:
-T is a requireed argument.  It is used to split the output file into smaller files
so that the PRP testing can be split across multiple cores.  The generated files
will be in ABCD format with a separate ABCD section for each distinct n.
This program will not generate more than 9999 files (unless you change the source).
I will add it to the Fermatsearch download page as soon as I (or someone else) will dedicate a little time to check its capabilities, or when you tell me it's ready for it.

P.S. I noticed some APIS on PrimeSieve to work with OpenMP. Do you consider giving your software multi-threading capabilities? In that case, it would surely be more powerful than FermFact...

Last fiddled with by ET_ on 2017-12-23 at 12:19

 2017-12-23, 15:39 #14 rogue     "Mark" Apr 2003 Between here and the 134448 Posts I changed -T midstream, so the readme is clearly wrong. I have in mind one optimization that should make it about 10 to 15^ faster than fermfact, but I have a second in mind that might make it 50% faster than fermfact. The first will be easy to code, the second not so easy. I'm also considering modifying it to switch to OpenCL (and multiple threads) after it reaches a certain depth.
 2017-12-23, 17:23 #15 rogue     "Mark" Apr 2003 Between here and the 592410 Posts Hmm. The one optimization I thought was obvious turned out to hut performance significantly. Back to the drawing board.
 2017-12-27, 19:29 #16 R. Gerbicz     "Robert Gerbicz" Oct 2005 Hungary 23×52×7 Posts I'll also come up with a totally new sieving program, comparing to Fermfact it'll be pretty fast.
 2017-12-27, 20:38 #17 ET_ Banned     "Luigi" Aug 2002 Team Italia 10010100111102 Posts Many thanks to both!
2017-12-27, 21:27   #18
rogue

"Mark"
Apr 2003
Between here and the

10111001001002 Posts

Quote:
 Originally Posted by ET_ Many thanks to both!
His will most likely be faster than mine. I will be very curious to see where he can improve the speed. To save you some time, you can use my code as a base. The places where you would need to inject your code should be fairly obvious.

2017-12-28, 17:44   #19
rogue

"Mark"
Apr 2003
Between here and the

22×1,481 Posts

Quote:
 Originally Posted by R. Gerbicz I'll also come up with a totally new sieving program, comparing to Fermfact it'll be pretty fast.
I suggest that we collaborate rather than compete. It would make life easier for everyone.

2017-12-28, 18:31   #20
R. Gerbicz

"Robert Gerbicz"
Oct 2005
Hungary

25708 Posts

Quote:
 Originally Posted by rogue I suggest that we collaborate rather than compete. It would make life easier for everyone.
Thanks, but basically nothing (new) left to write, just modify existing code (from me) to this project.

 2018-01-02, 21:02 #21 rogue     "Mark" Apr 2003 Between here and the 22×1,481 Posts I have implemented most of the second optimization I was referring to. The current version should about 5 to 10% faster than fermfact. I need to fix the factor verification code. It requires some changes so that it can "play nice" with the optimization I added. Once that factor verification code is fixed, it should be relatively easy to multi-thread. I will find that useful as I realized that I will need to resieve one of the ranges reserved to me. I split ranges of k across multiple runs of fermfact instead of ranges of n. As gfndsieve is 64-bit, it will not require me to split the range at all. I should be able to sieve that range much deeper than I had.

All times are UTC. The time now is 02:01.

Thu Oct 1 02:01:39 UTC 2020 up 20 days, 23:12, 1 user, load averages: 1.29, 1.47, 1.48

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.