mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > PrimeNet

Reply
 
Thread Tools
Old 2021-03-08, 05:55   #1
danc2
 
Dec 2019

2316 Posts
Default Newest PrimeNet interaction python program

Hello fellow Crunchers,
Cruncher Teal Dulcet (@tdulcet) and I (@danc2) have been working to expedite the computation of prime numbers. As a part of a separate project, we decided to debug, optimize, and add features to the existing PrimeNet Python script that exists to interact with the GIMPS project's V5 API. Please feel free to use, give feedback, and contribute to the project. Below are an unordered list of features. You may download the newest PrimeNet at this link.

Features
  • Builds on Loïc Le Loarer’s PrimeNet script with support for completely using the PrimeNet API.
  • Uses the PrimeNet API to get assignments if registered, which eliminates the password requirement and allows for the program to get much smaller Category 0 and 1 exponents, if it meets the other requirements (https://www.mersenne.org/thresholds/).
  • Improved error handling of the PrimeNet API calls.
  • Automatically detects the CPU model for the --cpu_model option.
  • Automatically registers the computer with PrimeNet if the user does NOT provide a password, which eliminates the -r/--register option.
  • Added a new --status option to output a status report and any expected completion dates for all assignments, similar to Prime95/MPrime. Includes the probability that each assignment is prime and the approximate number of decimal digits.
  • Added a new --unreserve_all option to unreserve all assignments in the worktodo file using the PrimeNet API.
  • Added many other new options, including -i/--workfile, -r/--resultsfile, -l/--localfile, --num_workers, -c/--cpu_num and -L/--days_work (replaces -L/--percent_limit). Run the --help option for more information about these new options.
  • Sends the FFT length when reporting assignment progress so the user can get partial CPU credit.
  • Outputs more debug messages when using the -d/--debug option. Debug messages now include the date and time. Output is much more consistent with Prime95/MPrime.
  • Outputs dates and numbers in locale format.
  • Outputs a message and bell sound before reporting prime results, similar to Prime95/MPrime.
  • Numerous bug fixes and performance improvements. Fixed many linting issues. Simplified script by using more Python modules. Removed lots of duplicate code. Updated all regular expressions to be more robust. Code formatted with autopep8.
  • When registering, it correctly sets the “application version string” on Windows and macOS and on 32-bit systems.
  • Uses the PRPDC= prefix for PRP DC assignments (the 151 worktype) as Prime95/MPrime does, so it can differentiate PRP and PRP DC tests after they have been written to the worktodo file.
  • Supports the 160 and 161 worktypes if/when Mlucas or GpuOwl supports them.
  • Support for getting the 4 P-1 factoring worktype if/when Mlucas supports it.
  • Preliminary support for getting the 200 proof certification worktype if/when Mlucas or GpuOwl supports it.
  • Complete CUDALucas support using a new -g/--gpu option. Easily extensible to support more GIMPS programs, such as GpuOwl.
  • Still supports Python 2.6 to 3.10. Supports Windows, macOS and Linux. Still supports Mlucas v19 and v18 (highly recommend that people use v19, as v18 does not output prime results to the results file).
  • Drop in replacement for any already setup instances of Loïc Le Loarer’s PrimeNet script.
  • The Mlucas and CUDALucas Linux scripts (1, 2) automatically download, setup and run it, including automatically setting most of the register options with the computer's system info.
danc2 is offline   Reply With Quote
Old 2021-04-14, 20:50   #2
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

37·79 Posts
Default

Nice! Will you be adding GPU72 support?
Mark Rose is offline   Reply With Quote
Old 2021-04-15, 09:26   #3
tdulcet
 
tdulcet's Avatar
 
"Teal Dulcet"
Jun 2018

2816 Posts
Default

Quote:
Originally Posted by Mark Rose View Post
Nice! Will you be adding GPU72 support?
No, it is primarily for primality testing. We are currently working on adding support for GpuOwl. However, if anyone wanted to add support for GPU72 and trial factoring, we would definitely accept a pull request.
tdulcet is offline   Reply With Quote
Old 2021-09-01, 14:17   #4
tdulcet
 
tdulcet's Avatar
 
"Teal Dulcet"
Jun 2018

23×5 Posts
Default Updated PrimeNet script

Since Daniel's update above almost six months ago, I have added several new features to our PrimeNet script:
  • Added new --no_more_work option to prevent the script from getting new assignments, but still allow it to report any results. Requested by @ewmayer here.
  • Added new --min_exp and --max_exp options so users can reserve exponents in a range. Supports both the v5 API and manual assignments. Useful for users who want to test exponents outside of the current wavefront. Requested by @danc2 here.
  • Added new --hours option, which sets the hours per day parameter when registering the system with PrimeNet and is also used for calculating the estimated completion dates. Previously this parameter was hardcoded to 24 hours.
  • Added new --L3 option, which sets the optional L3 cache size parameter when registering the system with PrimeNet.
  • Added support for the PFactor= (capital F) and Pfactor= assignment formats used by Mlucas v20 and GpuOwl v6. Added support for the PMinus1= (capital M) and Pminus1= assignment formats used by Mlucas v20. The script will also now ignore any lines in the worktodo file that it is not able to parse.
  • Added support for reporting P-1 assignment progress for Mlucas v20. Added support for reporting P-1 results, including for standalone assignments and when done before an LL/PRP test, for Mlucas v20.
  • Added support for reporting LL/PRP and P-1 assignment progress for GpuOwl. Added support for reporting LL/PRP and P-1 results (including standalone assignments, when done before an LL/PRP test and when combined with a PRP test) for GpuOwl. Added new -g/--gpuowl option for GpuOwl and --cudalucas option (replaces -g/--gpu) for CUDALucas. Adding PRP proof upload support is now the last piece remaining for complete GpuOwl support.
  • Added support for the 155 worktype (double-check using PRP with proof) for GpuOwl and Mlucas if/when it supports PRP proofs.
  • Worked with @Prime95 to support using Mlucas v20 and greater, GpuOwl and CUDALucas in the application version string when registering with PrimeNet.
  • Updated the -L/--days_work option to -W/--days_work and the --status option to -s/--status.
  • The worktype, nw, days_work, hostname, frequency, np, hp, guid config file variables were all renamed to WorkPreference, WorkerThreads, DaysOfWork, ComputerID, CpuSpeed, NumCPUs, CpuNumHyperthreads, ComputerGUID respectively for consistency with Prime95/MPrime.
  • It now stores the Hardware GUID in a HardwareGUID variable in the config file when first registering, similar to Prime95/MPrime. Needed for users who switch computers, so they do not get an error from the PrimeNet server that the GUID does not match.
  • Users can now set a SilentVictory variable in the config file to disable the sound when a new prime is found, similar to Prime95/MPrime. It will also now make the sound indefinitely in a separate thread if a new Prime is found, similar to Prime95/MPrime, instead of just three times.
  • Implemented many of the necessary changes to eventually support reserving individual assignments using the register assignment endpoint of the v5 API. Added support for parsing assignments in the worktodo file with N/A, n/a or 0 for the assignment ID and assignments with no ID at all.
  • Implemented many of the necessary changes to eventually support unreserving individual assignments in the worktodo file with an --unreserve option. Users can always use --unreserve_all to unreserve all assignments.
  • Worked around a bug in Mlucas v19.0/19.1 where the residues in the results file were not zero padded/filled. See here for more information.
  • Added this feature for those who need it.
  • Many other minor fixes and improvements. The script will now retry to submit results in more cases. All errors are now output without the need for the -d/--debug option, so the script will not silently fail.
Run the -h/--help option for more information about many of these new features. Feedback is welcome! @ewmayer wrote some very good documentation on how to use the script on the bottom of this page. While his documentation is for Mlucas, most of it also applies to GpuOwl and CUDALucas.

If anyone would like to contribute, there is a list of ideas here.
tdulcet is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange GPU interaction (bump) kladner Hardware 2 2017-02-24 21:34
PHP vs. Python vs. C (all with GMP) daxmick Programming 2 2014-02-10 01:45
Program interaction Chuck GPU Computing 6 2014-01-06 04:29
Newest idea of an idiot science_man_88 Miscellaneous Math 33 2010-04-21 16:33
Help w/ python. a216vcti Programming 7 2005-10-30 00:37

All times are UTC. The time now is 15:32.


Wed Oct 20 15:32:05 UTC 2021 up 89 days, 10:01, 0 users, load averages: 2.28, 2.46, 2.25

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.