mersenneforum.org  

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

Reply
 
Thread Tools
Old 2016-02-18, 06:13   #1
starionhost
 
Jan 2016

218 Posts
Default mprime process appears to not be running...

I have been attempting to install mprime on some servers in our data center.

I have noticed that after starting mprime, on some of the machines, mprime is showing high CPU usage in top as expected. But on a couple of machines, mprime is not even shown as one of the running processes, and does not appear to be doing anything. Processors on the machines that don't seem to be running the mprime process are:

Intel Celeron J1800 @ 2.41GHz
Intel Celeron 2.40GHz
Intel Xeon L5420 @ 2.50GHz

I have reinstalled, quit and released, restarted and gone through the settings a half-dozen times, but am not seeing anything that would kickstart this thing into number crunching, or anything preventing it.

Thoughts?

BTW, my 12-core Mac Pro is cranking out work units ahead of schedule and is keeping my office warm without the benefit of any heaters. I haven't tried breaking out the marshmallows yet though...

Last fiddled with by starionhost on 2016-02-18 at 06:52
starionhost is offline   Reply With Quote
Old 2016-02-18, 11:21   #2
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

What's the output of ./mprime -d?
Dubslow is offline   Reply With Quote
Old 2016-02-18, 13:02   #3
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

3·7·11·41 Posts
Default

Quote:
Originally Posted by starionhost View Post
I have reinstalled, quit and released, restarted and gone through the settings a half-dozen times, but am not seeing anything that would kickstart this thing into number crunching, or anything preventing it.
In addition to Dubslow's suggestion... Are you by any chance launching mprime into the background and then exiting? E.g. "./mprime & ; exit".

If so, it's important to decouple the STDIN, STDOUT and STDERR from the console before existing. For example, "./mprime </dev/null >/dev/null 2>/dev/null & ; exit". Otherwise after a short while mprime will exit when it sees its file handles are broken.
chalsall is online now   Reply With Quote
Old 2016-02-18, 14:29   #4
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

29·101 Posts
Default

You can also use screen -L /path/to/log/file
Mark Rose is offline   Reply With Quote
Old 2016-02-18, 14:34   #5
starionhost
 
Jan 2016

17 Posts
Default

I will look at all the suggestions here later today, but it should be noted that on the machines that are working vs. the machines that are not, I did nothing different in the installation or startup of mprime.
starionhost is offline   Reply With Quote
Old 2016-02-24, 05:10   #6
starionhost
 
Jan 2016

1116 Posts
Default

Quote:
Originally Posted by Dubslow View Post
What's the output of ./mprime -d?
[root@tubby prime95]# ./mprime -d
[Main thread Feb 23 23:08] Mersenne number primality test program version 28.7
[Main thread Feb 23 23:08] Optimizing for CPU architecture: AMD K8, L2 cache size: 1 MB
Another mprime is already running!

I am showing 100% idle on CPU usage and mprime is not shown in a top listing.

Last fiddled with by starionhost on 2016-02-24 at 05:15
starionhost is offline   Reply With Quote
Old 2016-02-24, 05:18   #7
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

22×11×167 Posts
Default

If there is a "PID=" entry in prime.txt or local.txt, try removing it.
Prime95 is online now   Reply With Quote
Old 2016-02-24, 05:28   #8
starionhost
 
Jan 2016

17 Posts
Default

Quote:
Originally Posted by Prime95 View Post
If there is a "PID=" entry in prime.txt or local.txt, try removing it.
Commented out the "Pid=" entry from local.txt file. Entry did not appear in the prime.txt file.

No change. Correction. CPU is still showing 100% idle, but top is showing mprime at 199.7% CPU.

So, now I'm confused.

How do I start mprime correctly from the command line, then get my terminal session back and still leave mprime running? Is it ./mprime </dev/null >/dev/null 2>/dev/null & ; exit as someone described earlier, and if so, can you explain what this does? I'm still somewhat green about the command line...

Last fiddled with by starionhost on 2016-02-24 at 05:34
starionhost is offline   Reply With Quote
Old 2016-02-24, 05:49   #9
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

How many cores does your computer have? What do you mean by "showing 100% idle" while simultaneously top shows mprime using two cores?

The command you posted (./mprime > /dev/null 2>&1 & or other variants) will indeed launch an mprime process that is independent of the terminal you start it from, and it may only be killed by running killall mprime (as opposed to, say, Ctrl+C being the standard way to kill interactive processes on the command line).

ps aux | grep mprime and killall mprime will be useful commands if you do indeed detach mprime from the terminal (which is what the last & means in the command above).

Perhaps a better way to run it, and the way I run it, is to use the screen command. That way you may run mprime independently of whatever terminal you're currently using, but you can watch its output and send commands to it (be it Ctrl+C or use of mprime's text menu) as you desire.

Simply speaking, run screen, which will launch a new virtual terminal/screen; run ./mprime -d (without any of the other fancy shell garbage) (being sure there's no other instances running, as usual), and watch it run; when you get bored of watching it, hit Ctrl+A followed by Ctrl+D to detach from the virtual terminal/screen; detaching will leave it running in the background. Then from any other terminal, at any time, you may run screen -r to reattach to the already-running screen when you want to check up on mprime.
Dubslow is offline   Reply With Quote
Old 2016-02-24, 06:01   #10
starionhost
 
Jan 2016

17 Posts
Default

Quote:
Originally Posted by Dubslow View Post
How many cores does your computer have? What do you mean by "showing 100% idle" while simultaneously top shows mprime using two cores?
I have 2 cores. I am simply going by the webmin CPU usage information, but I am seeing now that what webmin says is different than what top says....so skipping that for a second and moving on...

Quote:
Originally Posted by Dubslow View Post
ps aux | grep mprime and killall mprime will be useful commands if you do indeed detach mprime from the terminal (which is what the last & means in the command above).
I can't seem to get mprime to quit. killall mprime and it still shows in top.

I think I understand the rest about using screen, but I need to restart mprime somehow as it does not appear to be doing anything according to top. It's at the bottom of the cpu usage list at 0.0%, maybe stopped or idle somehow?
starionhost is offline   Reply With Quote
Old 2016-02-24, 06:02   #11
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

79×101 Posts
Default

You might want to create a user for mprime rather than use the root account.

Xyzzy is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another mprime is already running tshinozk Information & Answers 3 2013-12-10 16:26
Running mprime on fedora jimmychauck Information & Answers 1 2010-06-16 04:42
mprime is running but i dont see that mhnaras Linux 2 2007-10-21 15:58
running old version of mprime for speed? talcum Software 4 2005-03-03 15:24
running mprime on a computer I do not own happyraul Software 4 2004-05-06 15:54

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

Thu Feb 25 00:11:22 UTC 2021 up 83 days, 20:22, 0 users, load averages: 2.93, 3.07, 2.98

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.