mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Aliquot Sequences

Reply
 
Thread Tools
Old 2020-07-01, 21:40   #562
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3,463 Posts
Default

Quote:
Originally Posted by RichD View Post
This thread should answer your question.
Thanks! That's what I was thinking, but wanted to verify before I did any code changes. I might have been missing something.
EdH is offline   Reply With Quote
Old 2020-07-01, 23:45   #563
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

7×643 Posts
Default

This has always bugged me about aliqueit. I'd be quite grateful if you fixed it!
VBCurtis is online now   Reply With Quote
Old 2020-07-03, 21:36   #564
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3,463 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
This has always bugged me about aliqueit. I'd be quite grateful if you fixed it!
No promises, since I'm really just a dabbler in lots of languages, but I am looking over the code to see if it's something I might be capable of solving. I can already see a couple things I need to study. I'm holding the thought in the back of my mind of "simply" injecting a couple variables to keep track of what's been done and skipping it, if possible on a subordinate run.
EdH is offline   Reply With Quote
Old 2020-07-16, 04:37   #565
ChristianB
 
Apr 2013
Germany

3·103 Posts
Default

Could you please add your changes or proposals as an issue or pull request to https://github.com/ChristianBeer/aliqueit ? I would like to make a new version later this year and it would prevent extra effort if we shared also the small improvements.
ChristianB is offline   Reply With Quote
Old 2020-07-16, 11:37   #566
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

66078 Posts
Default

Quote:
Originally Posted by ChristianB View Post
Could you please add your changes or proposals as an issue or pull request to https://github.com/ChristianBeer/aliqueit ? I would like to make a new version later this year and it would prevent extra effort if we shared also the small improvements.
I don't know how to do that, but I'll try to figure it out. So far the only things I've actually changed are documented at the bottom of this post. The third item is not really a fix. I do have a couple more thoughts, but haven't gotten anywhere with them yet.
EdH is offline   Reply With Quote
Old 2020-07-17, 13:13   #567
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3,463 Posts
Default

Quote:
Originally Posted by ChristianB View Post
Could you please add your changes or proposals as an issue or pull request to https://github.com/ChristianBeer/aliqueit ? I would like to make a new version later this year and it would prevent extra effort if we shared also the small improvements.
I am looking at GitHub, but don't have an account. Since I'm totally unfamiliar with its workings (other than being able to retrieve stuff) I'm at a loss.

Side note: The current aliqueit.ini has a ";" after false in line 74 that needs to be removed.

On to aliqueit.cc. The following removes the b2scale references:
Code:
 --- aliqueit-orig.cc    2018-09-28 10:08:04.000000000 -0400
+++ aliqueit.cc    2020-07-17 08:35:01.907686619 -0400
@@ -250,8 +250,8 @@
         log_msg("\n", false);
         log_msg(msg + "\n");
         cout << msg << "              \r" << flush;
-        system(("echo " + input_number + " | " + cfg.ecm_cmd + " -pm1 -B2scale "
-                + tostring(cfg.b2scale_pm1) + " " + tostring(pb1) + " > " + cfg.ecm_tempfile).c_str());
+        system(("echo " + input_number + " | " + cfg.ecm_cmd + " -pm1 "
+                + tostring(pb1) + " > " + cfg.ecm_tempfile).c_str());
         int num_facs = find_log_factors_gmp_ecm(cfg.ecm_tempfile, input_number, "Factor found", ": ", new_factors);
         if (num_facs) {
             check_for_neat_factors(new_factors, cfg.neat_factor_limit_pm1);
@@ -264,8 +264,8 @@
         log_msg("\n", false);
         log_msg(msg + "\n");
         cout << msg << "              \r" << flush;
-        system(("echo " + input_number + " | " + cfg.ecm_cmd + " -one -pp1 -c 3 -B2scale "
-                + tostring(cfg.b2scale_pp1) + " " + tostring(pb1) + " > " + cfg.ecm_tempfile).c_str());
+        system(("echo " + input_number + " | " + cfg.ecm_cmd + " -one -pp1 -c 3 "
+                + tostring(pb1) + " > " + cfg.ecm_tempfile).c_str());
         num_facs = find_log_factors_gmp_ecm(cfg.ecm_tempfile, input_number, "Factor found", ": ", new_factors);
         if (num_facs) {
             check_for_neat_factors(new_factors, cfg.neat_factor_limit_pp1);
@@ -280,10 +280,10 @@
         cout << msg << "              \r" << flush;
         if (cfg.use_ecmpy) { //use ecm.py for multithreading
             system(("echo " + input_number + " | " + cfg.ecmpy_cmd + " -one -c " + tostring(curves)
-                    + " -B2scale " + tostring(cfg.b2scale_ecm) + " -out " + cfg.ecm_tempfile + " " + tostring(b1)).c_str());
+                    + " -out " + cfg.ecm_tempfile + " " + tostring(b1)).c_str());
         } else { //use regular ecm
             system(("echo " + input_number + " | " + cfg.ecm_cmd + " -one -c " + tostring(curves)
-                    + " -B2scale " + tostring(cfg.b2scale_ecm) + " " + tostring(b1) + " > " + cfg.ecm_tempfile).c_str());
+                    + " " + tostring(b1) + " > " + cfg.ecm_tempfile).c_str());
         }
         num_facs = find_log_factors_gmp_ecm(cfg.ecm_tempfile, input_number, "Factor found", ": ", new_factors);
         if (num_facs) {
I did not address the b2scale references in the aliqueit.ini file. I believe they can safely be deleted, but I haven't verified it.
EdH is offline   Reply With Quote
Old 2020-07-17, 19:56   #568
ChristianB
 
Apr 2013
Germany

3·103 Posts
Default

Posting the code diffs here works for me too.
The first edit for the factordb URL is already present in my version 1.13.

The second edit seems only to be needed for a newer version of ecm.py. I checked and my ecm.py is still version 0.34 which still has the B2scale option. I'm going to incorporate the changes in the new version so that aliqueit works with the current ecm.py.

The third edit I will need to investigate and maybe find a more suitable solution to fix the bleedthrough.

The following changes are already present in my version 1.13:
* update aliqueit to use latest versions of tools (except full yafu support)
* stop aliqueit with a message if yafu/gnfs/qs couldn't find a poly or failed in some other way (config option stop_on_failure)
* save incomplete line to file in case max_cofactor is reached
* update factordb URL
* add a mode to verify terminations and mergers when called from another script (config option verify_terminations)
* check first 8 mersenne primes in trial factoring step

Some of those were needed to implement the merge detection and verification of terminations for the blue page some (mersenne primes) were requested in this forum.

The next version is currently in the master branch and contains this change:
* try factors from previous index on next one

Last fiddled with by ChristianB on 2020-07-17 at 19:59
ChristianB is offline   Reply With Quote
Old 2020-07-17, 20:59   #569
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

66078 Posts
Default

I noticed your 1.13 had the factordb correction already and the third item* in my list was not intended to be a fix. ecm.py must take care of the b2scale issue now. When I first encountered it it was crashing due to GMP-ECM having removed b2scale quite some time ago.

I'm using ecmpi (called by a bash script) instead of ecm.py and have run into an issue. ecmpi does not recognize "-one," so it continues past the first factor to try to complete the factoring if possible. But, Aliqueit only finds one factor no matter how many are returned. I'm not sure if this is trouble with my conversion or if Aliqueit is only looking for one factor, since it sent "-one" out.

I thought I saw somewhere in the code comments a mention about this. But, it may not have been for ECM.

As mentioned earlier in this thread, Aliqueit duplicates ECM work if any factors are returned, but they don't complete the factorization for that line. I'm not sure if addressing the previous item will minimize that.

* I think but haven't confirmed that the bleed through is due to a tab being used to separate the index and the rest of the line. Could the fix is as simple as replacing a tab character with 3 spaces in some printf statements?
EdH is offline   Reply With Quote
Old 2020-07-26, 11:26   #570
ChristianB
 
Apr 2013
Germany

30910 Posts
Default

Quote:
Originally Posted by EdH View Post
* I think but haven't confirmed that the bleed through is due to a tab being used to separate the index and the rest of the line. Could the fix is as simple as replacing a tab character with 3 spaces in some printf statements?
I confirmed this is actually the case. Replacing the tab with spaces will fix it but will change the output in the log file and the elf file. It needs to be replaced for screen output only. I'll come up with something.
ChristianB is offline   Reply With Quote
Old 2020-07-26, 13:34   #571
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

346310 Posts
Default

Quote:
Originally Posted by ChristianB View Post
I confirmed this is actually the case. Replacing the tab with spaces will fix it but will change the output in the log file and the elf file. It needs to be replaced for screen output only. I'll come up with something.
I'll try to see if I can come up with a "real" idea (as opposed to my quick fix) too.

BTW, I edited my "How I..." thread to point to your GitHub version. That way I could take out the "factordb" edit, as you've already incorporated that change. I did have to rewrite a bit of extra description, due to noticing Aliqueit needs specific instruction (-i...) to begin a sequence now, rather than just providing a base number. I will have to keep that in mind.

There is one thing I'd like to address at some point, unless you already know: If I'm using -y to let YAFU perform all the external factoring, I can't get Aliqueit to stop once it's under way. If I use CTRL-C, YAFU interrupts, but Aliqueit just steps into another iteration. If I force the terminal to close, Aliqueit/YAFU just keeps going in the background. Even if I close YAFU via pkill or by kill PID, it gets started right back up with a new PID. I've been having to reboot the computer to kill everything. Any ideas?

Thanks for taking up the work on this.
EdH is offline   Reply With Quote
Old 2020-07-26, 13:42   #572
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

22×3×5×53 Posts
Default

What about printing 8 spaces to the screen with a <CR> right before the log entry. Anything left on the line is overwritten by the composite.
Code:
printf("        \r");
RichD 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 05:42.

Fri Dec 4 05:42:56 UTC 2020 up 1 day, 1:54, 0 users, load averages: 0.78, 0.93, 1.05

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.