mersenneforum.org  

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

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

32×13 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 offline   Reply With Quote
Old 2021-02-17, 22:03   #2
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

2·3·1,583 Posts
Default

Check out this thread (I found it by googling "mprime gracefully shutdown"
https://www.mersenneforum.org/showthread.php?t=13298
Uncwilly is offline   Reply With Quote
Old 2021-02-18, 00:36   #3
PhilF
 
PhilF's Avatar
 
Feb 2005
Colorado

13×47 Posts
Default

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
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

24416 Posts
Default

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
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

1D0516 Posts
Default

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
 
pepi37's Avatar
 
Dec 2011
After milion nines:)

141910 Posts
Default

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

2,377 Posts
Default

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

362610 Posts
Default

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 offline   Reply With Quote
Old 2021-03-01, 20:41   #9
keisentraut
 
Jul 2020

C16 Posts
Default

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
Reply

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:01.

Thu Apr 22 11:01:06 UTC 2021 up 14 days, 5:41, 0 users, load averages: 1.60, 1.86, 2.01

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.