Go Back > Great Internet Mersenne Prime Search > Software

Thread Tools
Old 2021-02-17, 21:34   #1
"David Kirkby"
Jan 2021
Althorne, Essex, UK

101011102 Posts
Default Can I cleanly stop mprime on Linux?

Is there a way to cleanly stop mprime, such that it writes what it needs to disk, then exits? I can obviously send a kill -9 to stop it, but that's not clean.
drkirkby is online now   Reply With Quote
Old 2021-02-17, 22:03   #2
6809 > 6502
Uncwilly's Avatar
Aug 2003
101×103 Posts

254B16 Posts

Check out this thread (I found it by googling "mprime gracefully shutdown"
Uncwilly is offline   Reply With Quote
Old 2021-02-18, 00:36   #3
PhilF's Avatar
Feb 2005

23·7·11 Posts

If you start mprime with the -m option, the menu is always active, even days later and while in the middle of the test. So, just type 4 and press enter to stop the test, then type 5 and press enter to exit mprime.

EDIT: Or, if you forget the menu option numbers, you can display the menu by just pressing enter.

Last fiddled with by PhilF on 2021-02-18 at 00:38
PhilF is offline   Reply With Quote
Old 2021-02-18, 04:12   #4
Happy5214's Avatar
Nov 2008
The Alamo City

22×149 Posts

I usually just use 5 alone. That stops the running workers and saves progress before exiting. 4-<Enter> doesn't work if there are workers that aren't running.
Happy5214 is offline   Reply With Quote
Old 2021-02-18, 04:34   #5
P90 years forever!
Prime95's Avatar
Aug 2002
Yeehaw, FL

7·1,069 Posts

mprime should create save files if you kill it (not kill -9)
Prime95 is offline   Reply With Quote
Old 2021-02-18, 06:07   #6
pepi37's Avatar
Dec 2011
After milion nines:)

22×5×71 Posts

Pkill mprime
pepi37 is online now   Reply With Quote
Old 2021-02-22, 16:04   #7
Bemusing Prompter
ixfd64's Avatar
Dec 2002

2×3×397 Posts

mprime will respond to Ctrl +C from what I remember.
ixfd64 is offline   Reply With Quote
Old 2021-02-22, 17:06   #8
paulunderwood's Avatar
Sep 2002
Database er0rr

32×11×37 Posts

Run top and press k (and kill the pid with SIGTERM?),

Last fiddled with by paulunderwood on 2021-02-22 at 17:09
paulunderwood is online now   Reply With Quote
Old 2021-03-01, 20:41   #9
Jul 2020

19 Posts

Just run "killall mprime", i.e. send a SIGINT to it. It will save the progess which will take a few seconds. mprime will only lose progress, if you send the SIGTERM too fast (few seconds) after the SIGINT or if the mprime process does not have write permissions.
keisentraut is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I stop mprime grabbing a new workload when its finished its current task? drkirkby Information & Answers 1 2021-01-24 14:34
How to stop mprime from requesting assignments SELROC PrimeNet 8 2018-10-15 15:48
How to gracefully stop mprime under linux odin Software 1 2010-04-15 20:45
mprime: how to stop exactly one worker (out of 2) axn Software 7 2009-03-28 10:56
mprime and linux Echoblade Information & Answers 3 2007-06-24 22:28

All times are UTC. The time now is 11:54.

Fri May 7 11:54:10 UTC 2021 up 29 days, 6:35, 0 users, load averages: 3.33, 2.60, 2.29

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.