mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software > Mlucas

Reply
 
Thread Tools
Old 2021-07-05, 20:19   #45
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

2×3×29×67 Posts
Default

Bug Alert: This bug will cause around 6% of completed results to not be successfully submitted to the server via the v5-APIified primenet.py script.

I first discovered the issue in March, around a month after v19.1 came out. It affects both v19.0 and 19.1. After reporting the problem to George and James Heinrich, I mis-read James' reply as meaning he had patched the API to accept the results in question; turns out he only patched the Manual Submission page. It seems there is no good way to work around this on the server/API-side, so users reading this, please check your nohup.out files for API error messages (keywords bolded) of the kind listed below, and then manually edit your results.txt file(s) to fix the offending entries.

primenet.py: submit_one_line_v5: Submitting using V5 API
{"status":"C", "exponent":63327331, "worktype":"LL", "res64":" 5DFBB5BD815400A", "fft-length":3670016, "shift-count":3025624, "error-code":"00000000", "program":{"name":"Mlucas", "version":"19.1"}, "timestamp":"2021-07-03 17:47:01 UTC", "aid":"7D690A965943BDCE33448D5072CF9AE1"}
primenet.py: submit_one_line_v5: ERROR while submitting result on mersenne.org: assignment_id=7D690A965943BDCE33448D5072CF9AE1
primenet.py: submit_one_line_v5: INVALID PARAMETER: this is a bug in primenet.py, please notify the author
primenet.py: submit_one_line_v5: Reason: parameter rd: Invalid value/precision: ' 5DFBB5BD815400A'

The problem is due to a silly print-leading-zeros formatting bug in the new JSON-result-format function I added in v19 - for the res64-field I used C print format %16llX instead of %016llX - the former causes any leading 0-hexits in the res64 to get printed as blanks, and the server treats such less-than-16-hexits-wide results as 'Invalid'.

The problem has been fixed in the Mlucas v20 dev-code (which I plan to release by end of this week) - the reason I didn't rush out a patch to v19 is 2-fold:

1 - I thought James had successfully worked around the problem via API-side hack;

2 - Patched code only solves the problem going forward - I didn't want to ask all the users to manually scan their results files for completed runs left in submission limbo doe to this.

In your run directories, assuming you invoke Mlucas v19 in the recommended way, via 'nohup ./Mlucas [whatever]', do 'grep Invalid nohup.out'. If that shows 1 or more matches, edit results.txt and fill the leading blanks in the corresponding res64 fields with 0s, then save the file. The primenet.py script will automatically try resubmitting the affected results on its next every-6-hour autoexec; I suggest you wait that long, then at your next opportunity check any such assignments for successful submission 2 ways:

1. grep for the exponent or res64 in results_sent.txt;

2. In a browser, load https://www.mersenne.org/report_exponent/?exp_lo=[your exponent here]&full=1 .

Alas, due to the elapsed months since I first noticed/reported the issue and having the not-patched-on-API-side-ness brought to my attention over the weekend, some of the affected results will inevitably have expired and been reassigned. For that, I apologize.

Last fiddled with by ewmayer on 2021-07-05 at 20:21
ewmayer is offline   Reply With Quote
Old 2021-07-06, 10:15   #46
tdulcet
 
tdulcet's Avatar
 
"Teal Dulcet"
Jun 2018

2816 Posts
Default

Quote:
Originally Posted by ewmayer View Post
In your run directories, assuming you invoke Mlucas v19 in the recommended way, via 'nohup ./Mlucas [whatever]', do 'grep Invalid nohup.out'. If that shows 1 or more matches, edit results.txt and fill the leading blanks in the corresponding res64 fields with 0s, then save the file. The primenet.py script will automatically try resubmitting the affected results on its next every-6-hour autoexec;
I just updated our PrimeNet script so it will automatically handle this without users needing to manually edit their results.txt file. Users can just download the new version over their existing copy.

Users of Loïc Le Loarer's older PrimeNet script (the one included with Mlucas v19.1) could instead make the same changes I made to our improved version: Replace the two occurrences of ar['res64'] with ar['res64'].strip().zfill(16). It will then automatically remove any blanks from the residue and add the needed leading zeros before submitting results to the PrimeNet server.
tdulcet is offline   Reply With Quote
Old 2021-07-06, 19:40   #47
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

2D8A16 Posts
Default

Quote:
Originally Posted by tdulcet View Post
I just updated our PrimeNet script so it will automatically handle this without users needing to manually edit their results.txt file. Users can just download the new version over their existing copy.

Users of Loïc Le Loarer's older PrimeNet script (the one included with Mlucas v19.1) could instead make the same changes I made to our improved version: Replace the two occurrences of ar['res64'] with ar['res64'].strip().zfill(16). It will then automatically remove any blanks from the residue and add the needed leading zeros before submitting results to the PrimeNet server.
Thanks, Teal - that's a very useful fiddle, I will post a link to the so-hacked Loarer-script in a v19 patch alert to the README. It should be moot in a few weeks when v20 is up, but for folks not reading this who are running v19 and then see the v20 thread and build that, including the modified script with that source base will automatically patch up any v19 results they have which are in limbo due to the print-bug, assuming they use the same rundir(s) as before and start v20 on any incomplete v19 runs they have.
ewmayer is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mlucas v19 available ewmayer Mlucas 89 2021-02-01 20:37
Mlucas v18 available ewmayer Mlucas 48 2019-11-28 02:53
MLucas on IBM Mainframe Lorenzo Mlucas 52 2016-03-13 08:45
Mlucas on Sparc - Unregistered Mlucas 0 2009-10-27 20:35
mlucas on sun delta_t Mlucas 14 2007-10-04 05:45

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


Fri Oct 15 20:39:25 UTC 2021 up 84 days, 15:08, 0 users, load averages: 1.96, 1.99, 1.99

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.