20220926, 18:36  #12 
"Ed Hall"
Dec 2009
Adirondack Mtns
2·5·7·73 Posts 
I haven't incorporated the stage1 adjustment yet to try to keep more in line with Gimarel's process. Unfortunately, my "good" GPU machine is not well and my weaker one only has two threads. So I'm currently running everything on a 24 thread CPU only machine. But it isn't multithreading at all. With np1 nps top shows 100 for the Msieve process and 3.2 for the machine CPU use. Even for a 1M through 1.2M limited range, it ran for over a day until I broke in so I could work on other portions of the script.

20220927, 04:51  #14  
Apr 2010
2^{2}·61 Posts 
Quote:
I try to set stage1_norm so the specialq range is near 1 to 2^32 for the current leading coefficient and modify msieve to use a bigger "other". I let CADOs sopt tune hundreds of thousands of stage 1 hits for numbers in the C20x range. This still takes less CPU wall clock time than GPU wall clock time on my system. 

20220927, 05:02  #15  
Apr 2010
11110100_{2} Posts 
Quote:
Quote:
Quote:
Quote:


20220927, 12:22  #16 
"Ed Hall"
Dec 2009
Adirondack Mtns
2×5×7×73 Posts 
Thanks!
I wrote a routine yesterday to cull the output from CADONFS sopt, based on the exp_E scores. I started with 6478 polynomials being fed to sopt, which returned its size optimized versions of all of them. I then pulled out all the lowest scoring exp_E ones and found I only had two (56.26). I added the five second lowest (56.38) and then the three third lowest (56.60). This gave me a total of ten. That's where I'm "playing" now. From your earlier posts, I'm expecting to run these ten through Msieve's root optimizing routine, using various stage2_norm values, but what should I look for in choosing the values? I'd like to script this as well. 
20220927, 16:26  #17 
Sep 2009
3·11·73 Posts 
I've managed to make msieve polyselect work quite well, but I've not used CADO at all. I hope my notes help.
For nonGPU work I just run several msieve tasks in parallel, each doing the whole job over a different range. Then I read each output file and find the poly with the highest score. With a GPU I run: Code:
msieve np1 nps t $NP1threads g 0 s $PREFIX.msieve.dat ... sort g u k $sortkey $PREFIX.msieve.dat.ms  head 200 >$PREFIX.msieve.dat.ms.cut split nr/$NUM_THREADS $PREFIX.msieve.dat.ms.cut $PREFIX.msieve.dat.ms # Creates $PREFIX.msieve.dat.msaa, $PREFIX.msieve.dat.msab, ... And finally search output from npr to find the best poly. If I understand this thread correctly then you are planning to run CADO sopt against the $PREFIX.msieve.dat.ms file, then run the output from than through msieve npr. So that would be just another step between msieve np1 nps and sort. Or possibly after sort to limit how many records you pass to CADO sopt. Am I correct? And would splitting the file to pass to several CADO sopt tasks be useful? Although getting it to work single threaded would be a good start before multithreading it (BTDTGTTS). 
20220927, 16:46  #18 
"Ed Hall"
Dec 2009
Adirondack Mtns
2×5×7×73 Posts 
Some good points to consider. Yes, I plan to follow the process of generating polynomials via Msieve, modifying them via Msieve, further converting them to sopt readable, running sopt and then finally, Msieve ropt. Part of this was already implemented in my spin script elsewhere, but Gimarel's rarely if ever, spun effectively. I'm hoping for a script that can be somewhat generic and produce polys that are the best they can be. Creating a script with multiple threads may be a good addition. I will consider that as I progress. Thanks.

20220927, 20:22  #19  
"Curtis"
Feb 2005
Riverside, CA
2^{2}×3×463 Posts 
Quote:


20220927, 20:33  #20 
"Ed Hall"
Dec 2009
Adirondack Mtns
2·5·7·73 Posts 
I believed I would be running np1 only, but msieve.dat.m does not include enough info for me to convert to the polynomials needed to supply sopt. Therefore, nps is currently necessary for that task, but with a high enough stage2_norm to prevent losing polynomials. I hope to eventually know enough to remove the nps stage altogether.

20220928, 04:54  #21  
Apr 2010
2^{2}×61 Posts 
Quote:
I don't know how to do this without a modified msieve in an efficiant way. My modification to msieve: Code:
Index: gnfs/poly/stage2/stage2.c ===================================================================  gnfs/poly/stage2/stage2.c (Revision 1035) +++ gnfs/poly/stage2/stage2.c (Arbeitskopie) @@ 298,6 +298,7 @@ curr_poly_t *c = &s>curr_poly; dd_precision_t precision = 0; uint32 precision_changed = 0; + double max_sizeopt_norm_backup = data>max_sizeopt_norm; if (!dd_precision_is_ieee()) { precision_changed = 1; @@ 329,7 +330,14 @@ } if (sizeopt_norm * exp(projective_alpha) <= data>max_sizeopt_norm)  root_sieve_run(data, sizeopt_norm, projective_alpha); + { + data>max_sizeopt_norm = sizeopt_norm * exp(projective_alpha) * 1.5; + for (i = 0; i < 5; i++, data>max_sizeopt_norm *= 1.5) + { + root_sieve_run(data, sizeopt_norm, projective_alpha); + } + data>max_sizeopt_norm = max_sizeopt_norm_backup; + } finished: if (precision_changed) 

20220928, 12:07  #22 
"Ed Hall"
Dec 2009
Adirondack Mtns
11766_{8} Posts 
I already do a short run of Msieve np1, terminate it, and read the degree (for the later conversion) and stage2_norm . I can modify it as I wish and make the multiple runs.

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculator that can factor and find exact roots of polynomials  alpertron  Programming  39  20220602 12:21 
Improving Polynomials With CADONFS and Msieve Tools  EdH  Factoring  4  20211018 14:29 
Combining Msieve with CADO NFS  mfeltz  Msieve  10  20160316 21:12 
How to find values of polynomials with nice factorization?  Drdmitry  Computer Science & Computational Number Theory  18  20150910 12:23 
how to run msieve or cadonfs on mpicluster?  ravlyuchenko  Msieve  1  20110816 12:12 