mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Aliquot Sequences

Reply
 
Thread Tools
Old 2009-03-17, 14:31   #1
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,097 Posts
Default Aliqueit.exe discussion

Quote:
Originally Posted by mklasson View Post
I've made a little home for aliqueit as well that will always have the latest version: http://mklasson.com/aliquot.php (similar to the ubasic program except it's C++ and created this millenium )
Thanks, this is working good for me. Good enough that I might consider doing some work on these fancy aliquot-thingamagigs.

I had actually started to code an aliquot sequence, err, computer, in YAFU because I refused to work with the UBASIC thing. But I can abandon that now. If anyone wants a chuckle, try running aliquot(N) in yafu, where N is the starting number. Its an undocumented feature, which will become an undocumented non-feature in the next version. It uses only yafu routines, so will start to choke around 95+ digits, can't parse anything, so can only start from scratch, and doesn't output anything useful either. And may produce bad results... heh... told you it's only good for a laugh.

- ben.
bsquared is offline   Reply With Quote
Old 2009-03-17, 16:25   #2
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·1,097 Posts
Default

Quote:
Originally Posted by bsquared View Post
told you it's only good for a laugh.

- ben.
It is faster though, for the starting values. Just (re)did the first 1225 iterations of 10212 in less than 2 minutes. But all the sequences are already past that point anyway, right?

p.s.
feel free to delete this and the preceeding posts - they are just clutter.

Last fiddled with by bsquared on 2009-03-17 at 16:25
bsquared is offline   Reply With Quote
Old 2009-03-17, 22:54   #3
mklasson
 
Feb 2004

2·3·43 Posts
Default

Quote:
Originally Posted by bsquared View Post
It is faster though, for the starting values. Just (re)did the first 1225 iterations of 10212 in less than 2 minutes.
Aliqueit could probably gain a good bit of overall speed from better ecm limits for all sizes of inputs. The current limits are basically a few half-decent guesses extrapolated to increasingly worse guesses.

I considered emulating the behaviour of aliquot.ub, but as that source code says "These are VERY wild guesses" I'm not sure that would be much better.

I don't know how optimal msieve's choices are. Maybe approximating that behaviour is a better start. Anyone with more knowledge of the matter care to chime in?
mklasson is offline   Reply With Quote
Old 2009-03-18, 03:14   #4
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

1100110110112 Posts
Default

Quote:
Originally Posted by mklasson View Post
Aliqueit could probably gain a good bit of overall speed from better ecm limits for all sizes of inputs. The current limits are basically a few half-decent guesses extrapolated to increasingly worse guesses. I don't know how optimal msieve's choices are. Maybe approximating that behaviour is a better start. Anyone with more knowledge of the matter care to chime in?
For smaller inputs, say less than 50 or 60 digits you could try just using msieve/yafu more. Msieve has good ecm choices for getting rid of small factors as does yafu, and the QS routines will quickly take care of the rest. For anything less than 60 digits you shouldn't be doing much ecm at all, IMO, assuming you first do trial division and pollard rho for a few hundred milliseconds. In yafu use the 'factor' function to automatically do this or something more customizable like siqs(rho(trial(N))).

For larger inputs say > 85 digits I'd start with the table in the GMP-ECM readme file and target doing ECM to, say, the 2/9*N digit level if the input is QSable or 1/3*N digit level if the input would otherwise need NFS.

In between 60 and 85 some ecm would be good to do. You may be able to get away with just calling msieve and letting it deal with the ecm'ing, but that assumes the user's msieve has that capability which it may not if home-built. Yafu's ecm is probably sufficiently slower at this point that gmp-ecm would be a good idea before QS.

Anyway, my $0.02.

- ben.

Last fiddled with by bsquared on 2009-03-18 at 03:16
bsquared is offline   Reply With Quote
Old 2009-03-18, 07:34   #5
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2·2,861 Posts
Default

Quote:
Originally Posted by mklasson View Post
Aliqueit could probably gain a good bit of overall speed from better ecm limits for all sizes of inputs. The current limits are basically a few half-decent guesses extrapolated to increasingly worse guesses.

I considered emulating the behaviour of aliquot.ub, but as that source code says "These are VERY wild guesses" I'm not sure that would be much better.

I don't know how optimal msieve's choices are. Maybe approximating that behaviour is a better start. Anyone with more knowledge of the matter care to chime in?
what version of aliquot.ub are you using?
henryzz is offline   Reply With Quote
Old 2009-03-18, 11:22   #6
mklasson
 
Feb 2004

2·3·43 Posts
Default

Quote:
Originally Posted by bsquared View Post
Anyway, my $0.02.
A bankable $0.02. :)

Quote:
Originally Posted by henryzz View Post
what version of aliquot.ub are you using?
None at all. I tried it once but the bundled interpreter complained about 64-bit windows and refused to start. That quote was from v1.25 though (from Sander's site).
mklasson is offline   Reply With Quote
Old 2009-03-18, 13:33   #7
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

63338 Posts
Default

Quote:
Originally Posted by mklasson View Post
I've made a little home for aliqueit as well that will always have the latest version: http://mklasson.com/aliquot.php (similar to the ubasic program except it's C++ and created this millenium )
I'm having some trouble compiling this under linux. Is that supported at all? I would also not rule out me doing something stoopid during compiling, as I haven't used c++ much.

Code:
buhrow@barista:~/aliquot$ g++ aliqueit.cc -l /user/buhrow/gmp/install4.2.3/lib/libgmp.a
aliqueit.cc:14:20: error: direct.h: No such file or directory
aliqueit.cc:109: error: âmpz_classâ was not declared in this scope
aliqueit.cc:109: error: template argument 1 is invalid
aliqueit.cc:109: error: template argument 3 is invalid
aliqueit.cc:109: error: template argument 4 is invalid
aliqueit.cc:109: error: invalid type in declaration before â;â token
aliqueit.cc:112: error: variable or field âfactorâ declared void
aliqueit.cc:112: error: âmpz_classâ was not declared in this scope
aliqueit.cc:112: error: âmpz_classâ was not declared in this scope
aliqueit.cc:112: error: template argument 1 is invalid
aliqueit.cc:112: error: template argument 1 is invalid
aliqueit.cc:112: error: template argument 2 is invalid
aliqueit.cc:112: error: âfactorsâ was not declared in this scope
aliqueit.cc:112: error: âmpz_classâ was not declared in this scope
aliqueit.cc:112: error: template argument 1 is invalid
aliqueit.cc:112: error: template argument 2 is invalid
aliqueit.cc:112: error: ânew_factorsâ was not declared in this scope
aliqueit.cc:112: error: expected primary-expression before âboolâ
aliqueit.cc:128: error: âmpz_classâ has not been declared
aliqueit.cc: In function âvoid add_and_check_cycle(unsigned int, int&)â:
aliqueit.cc:129: error: request for member âcountâ in âseq_valuesâ, which is of non-class type âintâ
aliqueit.cc:130: error: invalid types âint[int]â for array subscript
aliqueit.cc:133: error: invalid types âint[int]â for array subscript
aliqueit.cc: In function âvoid precalc_trial_primes()â:
aliqueit.cc:138: error: âmpz_classâ was not declared in this scope
aliqueit.cc:138: error: expected `;' before âpâ
aliqueit.cc:139: error: âpâ was not declared in this scope
aliqueit.cc: At global scope:
aliqueit.cc:272: error: âmpz_classâ was not declared in this scope
aliqueit.cc:272: error: template argument 1 is invalid
aliqueit.cc:272: error: template argument 2 is invalid
aliqueit.cc: In function âint find_log_factors(std::string, std::string, std::string, std::string, int&)â:
aliqueit.cc:285: error: request for member âpush_backâ in âfactorsâ, which is of non-class type âintâ
aliqueit.cc:285: error: âmpz_classâ was not declared in this scope
aliqueit.cc: At global scope:
aliqueit.cc:298: error: âmpz_classâ was not declared in this scope
aliqueit.cc:298: error: template argument 1 is invalid
aliqueit.cc:298: error: template argument 1 is invalid
aliqueit.cc:298: error: template argument 2 is invalid
aliqueit.cc: In function âvoid merge_factors(int&)â:
aliqueit.cc:299: error: request for member âbeginâ in âfactorsâ, which is of non-class type âintâ
aliqueit.cc:299: error: request for member âendâ in âfactorsâ, which is of non-class type âintâ
aliqueit.cc:300: error: request for member âsizeâ in âfactorsâ, which is of non-class type âintâ
aliqueit.cc:301: error: invalid types âint[size_t]â for array subscript
aliqueit.cc:301: error: invalid types âint[long unsigned int]â for array subscript
aliqueit.cc:302: error: invalid types âint[long unsigned int]â for array subscript
aliqueit.cc:302: error: invalid types âint[size_t]â for array subscript
aliqueit.cc:303: error: request for member âeraseâ in âfactorsâ, which is of non-class type âintâ
aliqueit.cc:303: error: request for member âbeginâ in âfactorsâ, which is of non-class type âintâ
aliqueit.cc: At global scope:
aliqueit.cc:310: error: âmpz_classâ was not declared in this scope
aliqueit.cc:310: error: template argument 1 is invalid
aliqueit.cc:310: error: template argument 2 is invalid
aliqueit.cc: In function âint run_ecm(std::string, int&)â:
aliqueit.cc:311: error: â_unlinkâ was not declared in this scope
aliqueit.cc: At global scope:
aliqueit.cc:331: error: âmpz_classâ was not declared in this scope
aliqueit.cc:331: error: template argument 1 is invalid
aliqueit.cc:331: error: template argument 2 is invalid
aliqueit.cc: In function âint run_yafu(std::string, std::string, int&)â:
aliqueit.cc:332: error: â_unlinkâ was not declared in this scope
aliqueit.cc: At global scope:
aliqueit.cc:341: error: âmpz_classâ was not declared in this scope
aliqueit.cc:341: error: template argument 1 is invalid
aliqueit.cc:341: error: template argument 2 is invalid
aliqueit.cc: In function âint run_msieve(std::string, int&)â:
aliqueit.cc:342: error: â_unlinkâ was not declared in this scope
aliqueit.cc: At global scope:
aliqueit.cc:351: error: âmpz_classâ was not declared in this scope
aliqueit.cc:351: error: template argument 1 is invalid
aliqueit.cc:351: error: template argument 2 is invalid
aliqueit.cc: In function âint run_ggnfs(std::string, int&)â:
aliqueit.cc:354: error: â_chdirâ was not declared in this scope
aliqueit.cc: At global scope:
aliqueit.cc:373: error: variable or field âfound_factorâ declared void
aliqueit.cc:373: error: âmpz_classâ was not declared in this scope
aliqueit.cc:373: error: âfactorâ was not declared in this scope
aliqueit.cc:373: error: âmpz_classâ was not declared in this scope
aliqueit.cc:373: error: template argument 1 is invalid
aliqueit.cc:373: error: template argument 1 is invalid
aliqueit.cc:373: error: template argument 2 is invalid
aliqueit.cc:373: error: âfactorsâ was not declared in this scope
aliqueit.cc:379: error: variable or field âadd_factorsâ declared void
aliqueit.cc:379: error: âmpz_classâ was not declared in this scope
aliqueit.cc:379: error: ânâ was not declared in this scope
aliqueit.cc:379: error: âmpz_classâ was not declared in this scope
aliqueit.cc:379: error: template argument 1 is invalid
aliqueit.cc:379: error: template argument 1 is invalid
aliqueit.cc:379: error: template argument 2 is invalid
aliqueit.cc:379: error: âfactorsâ was not declared in this scope
aliqueit.cc:379: error: âmpz_classâ was not declared in this scope
aliqueit.cc:379: error: template argument 1 is invalid
aliqueit.cc:379: error: template argument 2 is invalid
aliqueit.cc:379: error: ânew_factorsâ was not declared in this scope
Maybe this is helpful to know:
Code:
buhrow@barista:~/aliquot$ g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libmudflap --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-5)
bsquared is offline   Reply With Quote
Old 2009-03-18, 13:41   #8
mklasson
 
Feb 2004

2·3·43 Posts
Default

Quote:
Originally Posted by bsquared View Post
I'm having some trouble compiling this under linux. Is that supported at all?
I haven't tried it, but there's no reason it shouldn't work.

I'm using GMP's C++ class mpz_class, so try including gmpxx.lib. It's strangely not needed when compiling with MSVC though (gmp.lib is sufficient).
mklasson is offline   Reply With Quote
Old 2009-03-18, 13:50   #9
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

1100110110112 Posts
Default

ok, that helped. But it still can't find direct.h for the file manipulation stuff.

Code:
buhrow@barista:~/aliquot$ g++ aliqueit.cc -I /user/buhrow/gmp/gmp-4.2.3/ -l /user/buhrow/gmp/install4.2.3/lib/libgmp.a
aliqueit.cc:14:20: error: direct.h: No such file or directory
aliqueit.cc: In function âint run_ecm(std::string, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&)â:
aliqueit.cc:311: error: â_unlinkâ was not declared in this scope
aliqueit.cc: In function âint run_yafu(std::string, std::string, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&)â:
aliqueit.cc:332: error: â_unlinkâ was not declared in this scope
aliqueit.cc: In function âint run_msieve(std::string, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&)â:
aliqueit.cc:342: error: â_unlinkâ was not declared in this scope
aliqueit.cc: In function âint run_ggnfs(std::string, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&)â:
aliqueit.cc:354: error: â_chdirâ was not declared in this scope
aliqueit.cc: In function âvoid factor(mpz_class, std::vector<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int>, std::allocator<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int> > >&, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&, bool)â:
aliqueit.cc:408: error: invalid initialization of non-const reference of type âmpz_class&â from a temporary of type âmpz_classâ
aliqueit.cc:373: error: in passing argument 1 of âvoid found_factor(mpz_class&, std::vector<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int>, std::allocator<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int> > >&)â
Edit:
Ahhh, that's because it's a MS specific header file. I'll see if there's a linux substitute.

Last fiddled with by bsquared on 2009-03-18 at 13:53
bsquared is offline   Reply With Quote
Old 2009-03-18, 13:57   #10
mklasson
 
Feb 2004

2·3·43 Posts
Default

Yeah, appears to be ms-specific. unistd.h -> unlink() and chdir() for linux.
mklasson is offline   Reply With Quote
Old 2009-03-18, 14:05   #11
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,097 Posts
Default

Quote:
Originally Posted by mklasson View Post
Yeah, appears to be ms-specific. unistd.h -> unlink() and chdir() for linux.
yep. A couple of #ifdef's and that problem is gone. Here's the last hurdle:

Code:
buhrow@barista:~/aliquot$ g++ aliqueit.cc -I /user/buhrow/gmp/gmp-4.2.3/ -l /user/buhrow/gmp/install4.2.3/lib/libgmp.a
aliqueit.cc: In function âvoid factor(mpz_class, std::vector<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int>, std::allocator<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int> > >&, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&, bool)â:
aliqueit.cc:433: error: invalid initialization of non-const reference of type âmpz_class&â from a temporary of type âmpz_classâ
aliqueit.cc:398: error: in passing argument 1 of âvoid found_factor(mpz_class&, std::vector<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int>, std::allocator<std::pair<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, int> > >&)â
bsquared is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resuming aliqueit johnadam74 Aliquot Sequences 4 2016-03-28 12:32
Apparent aliqueit issue with specifying factors pakaran Aliquot Sequences 2 2015-09-12 23:10
Using Several Instances of Aliqueit for a large gnfs job EdH Aliquot Sequences 6 2011-12-13 18:58
Setting up aliqueit science_man_88 Aliquot Sequences 185 2011-11-08 12:18
Tried out aliqueit.exe: ggnfs failing Greebley Aliquot Sequences 35 2010-02-13 15:23

All times are UTC. The time now is 10:20.

Wed Sep 30 10:20:53 UTC 2020 up 20 days, 7:31, 0 users, load averages: 1.87, 1.45, 1.36

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.