Go Back > Great Internet Mersenne Prime Search > Software

Thread Tools
Old 2004-10-10, 13:33   #1
Oct 2004

2 Posts
Question Running multiple copies of mprime on Linux


I'm most active in Seventeen or Bust, but as I have as I have a problem with a test version of mprime (some new code for P-1 factoring) George suggested that I posted here.

I use a bunch of different machines (home directory shared via NFS) to run a mixture of prp clients, sieve clients and P-1 clients. To make that a bit easier I have written some scripts to start any client on any machine. Basically I have a script called `on` that two arguments a hostname and a job name, it then logs in on the given host, changes to the directory given be the job name, and starts another script called ``. Apart from some commands that just help me find out what jobs run on what computer, the scripts I created for mprime looks like this:
#! /bin/sh
cd ~/17orbust/p-1_1
./mprime -A1 &
#! /bin/sh
cd ~/17orbust/p-1_2
./mprime -A2 &
When I try to run these two scripts on the same machine (called shannon), the following happens:
grove@galois > ./on shannon p-1_1
grove@galois > ./on shannon p-1_2
grove@galois > Another mprime is already running!
What am I doing wrong
hc_grove is offline   Reply With Quote
Old 2004-10-10, 14:05   #2
Xyzzy's Avatar
Aug 2002

816410 Posts

In local.ini there is a line like this:


That is what causes the message to appear... I've never seen mprime report that unless there really was another mprime running, but it wouldn't hurt to check...

Maybe you could run "killall mprime" before you tried to start the new one? Or grep out the process id and kill it?
Xyzzy is offline   Reply With Quote
Old 2004-10-10, 14:33   #3
geoff's Avatar
Mar 2003
New Zealand

100100001012 Posts

The instance of mprime started as 'mprime -A1' writes its Pid in the file loca0001.ini, 'mprime -A2' writes it in loca0002.ini, etc. When they are stopped the Pid is set to zero.

If you created these files by copying the local.ini from an already running mprime then that could cause the message you see. If there really is no other mprime running then just deleting the Pid= line from the loca*.ini file should fix it.
geoff is offline   Reply With Quote
Old 2004-10-10, 15:34   #4
Oct 2004

2 Posts

Thank you.

I hadn't noticed that Pid= line, so I'd just made loca000N.ini a symlink (to be sure they all run with the same configuration I prefer symlinks over copying the file around), so when the first copy started it put it's pid in there, and then the others wouldn't start.

Now I've replaced the symlinks with copies (just means I have to do mre work if I decide to change the configuration) it works perfectly.
hc_grove is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running multiple ecm's johnadam74 GMP-ECM 21 2019-10-27 18:04
Linux and multiple GPU bgbeuning GPU Computing 52 2016-06-09 05:26
running two copies of prime95 in the same machine ppo Information & Answers 25 2007-07-30 23:25
Running mprime in verbose mode under linux? linux newbie Software 4 2006-03-21 16:13
Running on multiple machines Helfire Software 8 2004-01-14 00:09

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

Wed May 12 00:16:38 UTC 2021 up 33 days, 18:57, 0 users, load averages: 4.03, 4.01, 3.86

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.