![]() |
![]() |
#23 |
"Teal Dulcet"
Jun 2018
22×19 Posts |
![]()
In case anyone did not see this thread, @Prime95 updated the PrimeNet API to return 1.3 instead of 2 for the ll_tests_saved_if_factor_found parameter of P-1 assignments. This unfortunately broke our PrimeNet script, as it uses a regular expression to parse the assignment lines, which was expecting an integer. However, I just pushed a simple update to fix it. See here for the full changes.
Anyone who is using our PrimeNet script to get P-1 assignments (worktype 4) will need to update as soon as possible. The PrimeNet script ignores lines in the worktodo file that it cannot parse, so this issue will cause it to get a new assignment for every run/worker every 6 hours by default... Linux users could just run this from their mlucas_v20.1.1 directory to update: Code:
killall python3 rm primenet.py wget https://raw.github.com/tdulcet/Distributed-Computing-Scripts/master/primenet.py -nv |
![]() |
![]() |
![]() |
#24 |
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2·29·127 Posts |
![]()
Indeed. Only 3 tests_saved values are supported; 0, 1, 2.
In Mlucas.c, dated 2021-10-18, starting line 561, following fragment assumes the PRP worktodo line will contain tests_saved value 0, 1, or 2 only; Code:
tests_saved = strtoul(++char_addr, (char**)NULL, 10); if(tests_saved > 2) { sprintf(cbuf, "ERROR: the specified tests_saved field [%u] should be 0,1 or 2!\n",tests_saved); fprintf(stderr,"%s",cbuf); starting line 580, splitting nonzero tests_saved assignment to separate P-1 and PRP will fail because it assumes tests_saved occupies a single character, not 3 as in "1.3" or "0.9" or "1.1" or 4 as in "1.05"; Code:
// Copy up to the final (tests_saved) char of the assignment into cstr and append tests_saved = 0; // A properly formatted tests_saved field is 1 char wide and begins at the current value of char_addr: i = char_addr - in_line; strncpy(cstr,in_line, i); cstr[i] = '0'; cstr[i+1] = '\0'; // Append the rest of the original assignment. If original lacked a linefeed, add one to the edited copy: strcat(cstr,in_line + (i + 1)); if(cstr[strlen(cstr)-1] != '\n') { strcat(cstr,"\n"); } |
![]() |
![]() |
![]() |
#25 |
∂2ω=0
Sep 2002
República de California
5·2,351 Posts |
![]()
@tdulcet: I saw the thread in question and had a look at what happens with such fractional-test-saved assignment. Long story short - there should be no problem for Mlucas users.
Step-through debug of George's example Pfactor assignment did, however, turn up a bug in the parsing code for that assignment type, which leads to nonsense values for the TF_BITS and tests_saved variables. For instance for the example assignment PFactor=9A0F34B929B282C41C75682C9496D92B,1,2,109343671,-1,76,1.3 after the k,b,n,c data quartet - '1,2,109343671,-1' here - used to encode the modulus as k*b^n+c is (correctly) processed, instead of the char* used as a placeholder for where-to-resume-parsing advancing to the ',76', it gets reset to the '=9A0F...'. That results in both TF_BITS and tests_saved getting assigned the largest parseable decimal-int following the '=', which is 9 in this case. Again not an issue since the ensuing p-1 bounds-setting currently ignores those values, but fixed in my dev-branch version of the code, obviously. I also tried swapping the leading '9' in the above AID from the left to right end, yielding A0F34B929B282C41C75682C9496D92B9, to see what happens when the first char after the '=' is not a decimal integer, that causes TF_BITS and tests_saved to retain their default init values of 0, again not a problem. Ken's code-snips which check that tests_saved <= 2 are for PRP-assignment parsing, which are not being changed to support such fractional values, at least as yet. But just to see what would happen with the current v20.1.1 release were such to occur, I modified the assignment type in the above example from PFactor to PRP: PRP=A0F34B929B282C41C75682C9496D92B9,1,2,109343671,-1,76,1.3 The parsing code again ignored the '.3' fractional part, yielding tests_saved = 1 and the original assignment was overwritten by the following split form: Pminus1=A0F34B929B282C41C75682C9496D92B9,1,2,109343671,-1,1200000,0 PRP=A0F34B929B282C41C75682C9496D92B9,1,2,109343671,-1,76,0.3 That is still potentially problematic, since the split-off PRP assignment gets set not to the intended 0, but to 0 followed by the unmodified .3 fraction from the original 1.3. But, once the p-1 assignment completes, assuming no factor is found, we move on the PRP assignment, and now the same parsing code again ignores the .3, yielding tests_saved = 0 and proceeding to the PRP test. For PRP assignments, the only problematic tests_saved values would be ones >= 3, with or without a nonzero fractional part. If anyone does encounter any crash or untowardness-in-practice resulting from such fractional test-saved values, please post details here, as usual. |
![]() |
![]() |
![]() |
#26 |
∂2ω=0
Sep 2002
República de California
5×2,351 Posts |
![]()
Small patch uploaded - The bug only manifests for users doing PRP tests and who have set CheckInterval = 1000, the minimal allowable value, in their mlucas.ini file. (Such a low value is not generally recommended since on all but the slowest systems it wastes 1-2% runtime doing excessively frequent savefile writes.)
As always, post #1 in this thread has updated MD5 value for the release tarball, and the README linked there has details about the issue addressed. |
![]() |
![]() |
![]() |
#27 |
Jan 2016
Mighty Black Stump
17 Posts |
![]()
Hey, I just finished a PRP on 113091931. For whatever reason, my primenet.py has stopped working so I have had to upload the result manually. Do I need to upload a proof file anywhere? Sorry if I am mistaken somehow.
|
![]() |
![]() |
![]() |
#28 |
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2×29×127 Posts |
![]() |
![]() |
![]() |
![]() |
#29 |
∂2ω=0
Sep 2002
República de California
2DEB16 Posts |
![]()
Small patch which fixes an infrequent (but run-killing when it occurs) issue with multithreaded runs of p-1 stage 2.
As always, post #1 in this thread has updated MD5 value for the release tarball, and the README linked there has details about the issue addressed, and download links. |
![]() |
![]() |
![]() |
#30 | |
"Teal Dulcet"
Jun 2018
22×19 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mlucas v20.1 available | ewmayer | Mlucas | 7 | 2021-09-19 17:39 |
Mlucas v20 available | ewmayer | Mlucas | 9 | 2021-09-02 20:36 |
Mlucas v19.1 available | ewmayer | Mlucas | 46 | 2021-07-06 19:40 |
Mlucas v19 available | ewmayer | Mlucas | 89 | 2021-02-01 20:37 |
mlucas on sun | delta_t | Mlucas | 14 | 2007-10-04 05:45 |