mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Operazione Doppi Mersennes

Reply
 
Thread Tools
Old 2014-06-23, 17:35   #320
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

224058 Posts
Lightbulb

Quote:
Originally Posted by ET_ View Post
- What do you mean with "The highest testable N is now 223, and the highest bitlevel is 252. Practically, because k<=2^45 are already tested, the highest usable N is 207"? The previous limit of mmff-0.27 was N<174; is the actual limit equal to N<208?
I mean exactly what I wrote. The previous (0.27) nominal limit was N<192.
You could test N=191 for k's up to 29 bits is size.
Current nominal limit is N<224.
You could test N=223 for k's up to 29 bits is size.

Quote:
Originally Posted by ET_ View Post
- Our previous version was limitd to k>224. Does this limit still stand?
Maybe it was for very low values of N. For high values of N, 214<k<263 are allowed, and indeed this input line
Code:
FermatFactor=217,16384,32767    ; Suyama (1980)
works ...and recovers the factor.

I think I want to modify the code a little bit to report factors in the normalized form. (Albeit it is not too hard to do by hand. But doing it all the time for GFN factors is getting a bit old for me and the output is looking horrendous, even if awe-inspiring) E.g.
Code:
GF(181,3) has a factor: 2269880559811350882108268285448756599351611328777559153780432306177 [TF:220:221:mmff-gfn3 0.28 mfaktc_barrett224_F160_191gs]
GF(199,5) has a factor: 5240660087353831676253871671260590507538335119049430450977887836562259969 [TF:241:242:mmff-gfn5 0.28 mfaktc_barrett247_F192_223gs]
GF(206,12) has a factor: 26264920974787795159990461827258813827760860586148343034700355283076513793 [TF:243:244:mmff-gfn12 0.28 mfaktc_barrett247_F192_223gs]
will become
Code:
GF(181,3) has a factor: 370291543969*2^182+1 [TF:220:221:mmff-gfn3 0.28 mfaktc_barrett224_F160_191gs]
GF(199,5) has a factor: 407658847371*2^203+1 [TF:241:242:mmff-gfn5 0.28 mfaktc_barrett247_F192_223gs]
GF(206,12) has a factor: 15961621533*2^210+1 [TF:243:244:mmff-gfn12 0.28 mfaktc_barrett247_F192_223gs]
Batalov is offline   Reply With Quote
Old 2014-06-23, 18:27   #321
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Here is the patch. Some people will need the output be exactly as it was before, so they should not apply the patch.

Code:
*** ../../mmff-0.28/src/output.c        2012-10-22 14:00:18.000000000 -0400
--- output.c    2014-06-23 14:20:52.416938792 -0400
***************
*** 438,454 ****

    if(factor_number < 10)
    {
      if(mystuff->mode != MODE_SELFTEST_SHORT)
      {
        if(mystuff->printmode == 1 && factor_number == 0)printf("\n");
!       printf("%s has a factor: %s\n", exponent_string, factor);
      }
      if(mystuff->mode == MODE_NORMAL)
      {
  #ifndef MORE_CLASSES
!       fprintf(resultfile, "%s%s has a factor: %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter <  96)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
  #else
!       fprintf(resultfile, "%s%s has a factor: %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter < 960)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
  #endif
      }
    }
--- 438,473 ----

    if(factor_number < 10)
    {
+     char k[155]; int carry, i, l, N;
+
+     /* SB: don't want to mess with lower functions; I will simply do the k calculation here on a decimal string */
+     /* factors are extremely rare, anyway */
+
+     l = strlen(factor)-1;
+     memcpy(k, factor,l+2);
+     for(N=0; N==0 || (k[l]%2)==0; N++) {      /* factor = "k*2^N+1"; disregard last odd digit once */
+       for(i=carry=0; i<=l; i++) {
+         int d = k[i] - '0' + 10 * carry;
+         carry = d & 1;
+         k[i]  = d / 2 + '0';
+       }
+     }
+     l++; /* now it is strlen */
+     for(i=0; k[i]=='0'; i++);         /* squeeze leading zeroes */
+     if(i) { l -= i; memmove(k, k+i, l); }
+     sprintf(k+l, "*2^%d+1", N);
+
      if(mystuff->mode != MODE_SELFTEST_SHORT)
      {
        if(mystuff->printmode == 1 && factor_number == 0)printf("\n");
!       printf("%s has a factor: %s\n", exponent_string, k);
      }
      if(mystuff->mode == MODE_NORMAL)
      {
  #ifndef MORE_CLASSES
!       fprintf(resultfile, "%s%s has a factor: %s = %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, k, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter <  96)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
  #else
!       fprintf(resultfile, "%s%s has a factor: %s = %s [TF:%d:%d%s:mmff %s %s]\n", UID, exponent_string, k, factor, mystuff->bit_min, mystuff->bit_max_stage, ((mystuff->stopafterfactor == 2) && (mystuff->stats.class_counter < 960)) ? "*" : "" , MFAKTC_VERSION, mystuff->stats.kernelname);
  #endif
      }
    }

Last fiddled with by Batalov on 2014-06-23 at 18:30
Batalov is offline   Reply With Quote
Old 2014-06-28, 02:34   #322
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

250516 Posts
Cool

Attached is the mmff-gfn v.0.28 source. I've tested it thoroughly on all new bit ranges, but let me know if you will encounter errors.

When building the binaries, build five times (after editing Makefile, the row "BASE = ..."), and do 'make clean' between builds. Jerry will probably help us build all Windows binaries as previously.

Good hunting to all!
Attached Files
File Type: zip mmffgfn-0.28.zip (191.9 KB, 174 views)
Batalov is offline   Reply With Quote
Old 2014-06-29, 00:20   #323
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Quote:
Originally Posted by ET_ View Post
As I am actually lacking a GPU system, may I ask for some volunteering effort? Our site would benefit from an executable version of mmff-0.28 for the main OSes.

Thank you

Luigi
Luigi, until yesterday I could only build and test on linux. I can build and post the linux64 binaries with 2.0, 2.1, 3.0 and 3.5 enabled and based on CUDA 5.0. I cannot build distributable Windows binaries (I tried - it sort of builds...); we'll have to ask Jerry.

I will have to dig deep back into PMs where Xyzzy sent me instructions how to ftp binaries to the site. It's been 2 years - I don't remember any passwords at all.

Last fiddled with by Batalov on 2014-06-29 at 00:52
Batalov is offline   Reply With Quote
Old 2014-07-11, 02:24   #324
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default

mmff and mmff-gfn 0.28 Windows binaries x86 and x64 posted to:

http://mersenneforum.org/mmff/

and

http://mersenneforum.org/mmff-gfn/

Everything is CUDA 6.0, sm_20, 21, 30, 32, 35 and 50.

If you need anything else, let me know.

Last fiddled with by flashjh on 2014-07-11 at 02:37
flashjh is offline   Reply With Quote
Old 2014-07-11, 02:40   #325
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100101000001012 Posts
Default

Many thanks! ;-)
Batalov is offline   Reply With Quote
Old 2014-07-11, 02:53   #326
flashjh
 
flashjh's Avatar
 
"Jerry"
Nov 2011
Vancouver, WA

1,123 Posts
Default

Quote:
Originally Posted by Batalov View Post
Many thanks! ;-)
No problem
flashjh is offline   Reply With Quote
Old 2014-07-11, 09:11   #327
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

32×5×107 Posts
Default

Quote:
Originally Posted by flashjh View Post
mmff and mmff-gfn 0.28 Windows binaries x86 and x64 posted to:

http://mersenneforum.org/mmff/

and

http://mersenneforum.org/mmff-gfn/

Everything is CUDA 6.0, sm_20, 21, 30, 32, 35 and 50.

If you need anything else, let me know.
Thank you!

I will soon update FermatSearch with your executable.
Now, only Linux and MAC executables are missing...

Luigi
ET_ is offline   Reply With Quote
Old 2018-09-29, 09:58   #328
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

10010110011112 Posts
Default

New CUDA version, new mmff required.

A friend of us required a mmff version compiled for his GTX 1060 and CUDA 8.

I have no Nvidia SDK or boards on my PC at the moment, so I can provide neither Linux nor Windows ones. I hope I will have a Windows version soon (thanks to Jerry).

Thank you!!

Luigi
ET_ is offline   Reply With Quote
Old 2018-09-30, 02:38   #329
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

24×211 Posts
Default

I have compiled mmff-gfn with CUDA 8.0 on linux with sm_30, 35, 50, 52, 61. The binary is mmff-gfn3.exe. Hopefully, this is helpful.

The source of the file is here.
Attached Files
File Type: zip mmffgfn-0.28.zip (1.75 MB, 114 views)

Last fiddled with by RichD on 2018-09-30 at 02:41
RichD is offline   Reply With Quote
Old 2018-09-30, 08:18   #330
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

32×5×107 Posts
Default

Quote:
Originally Posted by RichD View Post
I have compiled mmff-gfn with CUDA 8.0 on linux with sm_30, 35, 50, 52, 61. The binary is mmff-gfn3.exe. Hopefully, this is helpful.

The source of the file is here.
That friend of mine tried to compile the source of mmff 0.28 under Windows for a GTX 1060 with no success. Source is available to mersenneforum/mmff, download.mersenne.ca and doublemersennes.org. It is the executable for Windows (and Linux) for CUDA 8 I am looking for, as I have no CUDA platform available at this time.

Last fiddled with by ET_ on 2018-09-30 at 08:19
ET_ is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mersenne trial division implementation mathPuzzles Math 8 2017-04-21 07:21
trial division over a factor base Peter Hackman Factoring 7 2009-10-26 18:27
P95 trial division strategy SPWorley Math 8 2009-08-24 23:26
Trial division software for Mersenne SPWorley Factoring 7 2009-08-16 00:23
Need GMP trial-division timings ewmayer Factoring 7 2008-12-11 22:12

All times are UTC. The time now is 00:38.


Sat Jul 17 00:38:40 UTC 2021 up 49 days, 22:25, 1 user, load averages: 1.06, 1.08, 1.24

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.