AutoPrimeNet: The Ultimate PrimeNet assignment handler program

Prime95 has built-in automated assignment handling. This tool brings the same ease-of-use to all GIMPS programs (PRPLL, Mlucas, mfaktc/mfakto, etc)!
See the full Quick Start Guide for more details about the setup prompts and what to enter.

Windows Users
  1. Download the .exe version (64-bit or 32-bit), unzip to where you have your GIMPS program (e.g. mfaktc or PRPLL-NTT).
  2. Run autoprimenet.exe (from Windows Terminal if possible, or just double-click if you're not comfortable with command-line programs) and go through the setup wizard.
    If you're not sure about any settings, see Quick Start Guide for more details, or just hit <enter>⏎ to accept the default value.
  3. Once the setup wizard is complete, the window will close, double-click autoprimenet.exe again and it will start up in monitoring mode and fetch work and submit results every hour.
  4. Start up your GIMPS program (mfaktc, PRPLL-NTT, etc).

Linux/macOS Users
  1. Download autoprimenet.py (right-click save-as, or wget)
  2. Run python3 autoprimenet.py --setup to run the setup wizard.
  3. Once the setup wizard is complete run python3 autoprimenet.py and it will start up in monitoring mode and fetch work and submit results every hour.
  4. Start up your GIMPS program (mfaktc, PRPLL-NTT, etc).

Please consider making a donation to support the continued development of AutoPrimeNet.

About AutoPrimeNet

Prime95 has built-in assignment handling using the PrimeNet v5 API. Users should use an automated assignment handler when one is available for their GIMPS software instead of the legacy manual testing/assignment pages. This provides many advantages for users, including:

AutoPrimeNet is an automated assignment handler program that also uses the PrimeNet API. It supports most other GIMPS software, including Mlucas, GpuOwl, PRPLL, PrMers, CUDALucas, mfaktc, mfakto and PrimePath, and can additionally report results from Prime95/MPrime, CUDAPm1, cofact and gvtf. It is written and maintained by Teal Dulcet, with previous contributions from Daniel Connelly (CUDALucas) and Tyler Busby (mfaktc/mfakto). It was originally adapted from an older script for Mlucas by Loïc Le Loarer and Ernst W. Mayer. As with Prime95, this program will automatically get and register assignments, report assignment progress and results, upload proof files to and download certification starting values from the PrimeNet server. It can additionally get assignments and report results to mersenne.ca for exponents above the current PrimeNet limit of 1G. It should support all Windows, macOS and Linux systems from the past 12+ years. Below are some basic instructions to download and setup the program:

Download

Windows Users

Windows users on x86 and ARM systems can click one of the links in the table to download a standalone executable that packages the latest versions of Python, all of the dependencies and AutoPrimeNet itself. Note that the latest version of Python currently requires Windows 10+. Standalone executables that support older versions of Windows, including Windows Vista, 7 and 8, are also provided. It is recommended that users on Windows 10+ use the Windows Terminal to run both their GIMPS software and AutoPrimeNet. (Users on older versions of Windows would need to use the Windows PowerShell or Command Prompt.) Click this link for how to determine if you are running a 32 or 64 bit version of Windows.

x86 ARM
64-bit 32-bit 64-bit
Windows (10, 11 or newer) AutoPrimeNet_Windows_x64.zip AutoPrimeNet_Windows_x86.zip AutoPrimeNet_Windows_arm64.zip
Windows older 8.1 AutoPrimeNet_Windows-8.1_x64.zip AutoPrimeNet_Windows-8.1_x86.zip N/A
Vista, 7, 8 AutoPrimeNet_Windows-Vista-7-8_x64.zip AutoPrimeNet_Windows-Vista-7-8_x86.zip N/A
XP AutoPrimeNet_Windows-XP_x64.zip AutoPrimeNet_Windows-XP_x86.zip N/A

Just extract the ZIP file and save the autoprimenet.exe executable to the same directory as your GIMPS software. Then, open the terminal in that directory and run: autoprimenet --help to verify that everything works. Lastly, skip down to the Setup section below and be sure to use just “autoprimenet” instead of “python3 autoprimenet.py” in those commands.

Linux/macOS Users

All other users should follow these three steps to install Python and download the program:

  1. Install Python: macOS and Linux should already include Python by default. Windows users can download an installer from python.org. The program currently supports Python 3.4+, but if possible, users are strongly encouraged to use one of the last five Python 3 minor versions that still receive updates AutoPrimeNet version 1.2.2 was the last to support Python 2.
  2. Install the dependencies: Most Python installations should already include the Requests library. AutoPrimeNet will automatically prompt on first run to install it if needed, but it can be typically be installed by running: python3 -m pip install requests. If you need SOCKS proxies support, run: python 3 -m pip install "requests[socks]" instead. (Users using an older version of Python may need to install a corresponding older version of the library.) Some recent Python installations may suggest first setting up a virtual environment, but this should not be needed for most users. If Python was installed with a package manager, you should install the Requests library with the package manger as well. For example, Debian/Ubuntu users could run: sudo apt install python3-requests.
  3. Download the program: Right-click this link and select “Save link as…” to download the latest version of the program from the mersenne.ca mirror. Just save the autoprimenet.py file to the same directory as your GIMPS software. Then, open the terminal in this directory and run: python3 autoprimenet.py --help to verify that everything works. Windows users may need to use the py launcher instead of python3.

The program uses some Unicode characters to improve the output, so if you encounter a UnicodeEncodeError exception, you may need to set a PYTHONIOENCODING=utf-8 environment variable before running the program.

Setup

  1. Register your system with PrimeNet:
    Recommended Just run this command for the program to automatically prompt for all of the needed options:
    python3 autoprimenet.py --setup
    Alternatively - Command line options (click to show) Run the below command using the command line options. See the -h/--help output above for the full list of available options and the respective default values. Users will need to add the corresponding option for the GIMPS software that they are using, so -m/--mlucas for Mlucas, -g/--gpuowl for GpuOwl, --prpll for PRPLL, --prmers for PrMers, --cudalucas for CUDALucas, --mfaktc for mfaktc, --mfakto for mfakto or --primepath for PrimePath. If you have more than one worker and are not using PRPLL, add the -D/--dir option for each worker directory. The -T/--workpref option can also be provided once per worker. AutoPrimeNet saves its configuration to a “prime.ini” file by default, so it is only necessary to provide these options the first time it is run.
    python3 autoprimenet.py --timeout 0 --username <PrimeNet User ID> [--computer-name <computer name>] [--workpref <work preference>] [--num-workers <num>] [--dir <directory>]
    Supported work preferences (click to show) 4 - P-1 factoring
    5 - ECM factoring
    8 - ECM on Mersenne cofactors
    12 - Trial factoring GPU
    101 - Double-check LL tests
    106 - Double-check LL tests with zero shift count,
    150 - First time PRP tests
    151 - Double-check PRP tests
    152 - World record PRP tests
    153 - 100 million digit PRP tests
    154 - Smallest available first time PRP that needs P-1 factoring
    155 - Double-check using PRP with proof
    156 - Double-check using PRP with proof and nonzero shift count
    160 - First time PRP on Mersenne cofactors
    161 - Double-check PRP on Mersenne cofactors


    Worktype Mlucas GpuOwl PRPLL PrMers CUDALucas CUDAPm1 mfaktc/mfakto PrimePath
    4
    5
    8
    12
    101
    106 ✔*
    150
    151**
    152
    153
    154 ✔*
    155
    156
    160
    161
    * Some previous versions of GpuOwl
    ** Frequently returns LL DC assignments instead of PRP DC

    For example, for PRPLL-NTT: python3 autoprimenet.py --timeout 0 --username ANONYMOUS --computer-name example --workpref 150 --prpll

    (or equivalently using the short options: python3 autoprimenet.py -t 0 -u ANONYMOUS -H example -T 150 --prpll)
  2. Start the program: Run the below command each time you want to start the program. Advanced/power users may want to add the -d/--debug option for more verbose output.
    python3 -OO autoprimenet.py [--timeout <update frequency (sec)>] [--checkin <checkin frequency (hours)>]...
    For example, for PRPLL-NTT (with the default 1 hour update and checkin frequency): python3 -OO autoprimenet.py

For more information about AutoPrimeNet and for support, please see the dedicated thread on the forum (may require a sign in). Note that there are many other older programs/scripts that may be bundled with the download for your GIMPS software and appear similar to this program, but they are just simple wrappers around the legacy manual testing/assignment pages. If a program requires you to provide your GIMPS password, it is not using the PrimeNet API and therefore cannot provide most of the functionality or benefits listed above.