mersenneforum.org  

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

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

2 Posts
Question Running multiple copies of mprime on Linux

Hi

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 `job.sh`. Apart from some commands that just help me find out what jobs run on what computer, the job.sh scripts I created for mprime looks like this:
Code:
#! /bin/sh
cd ~/17orbust/p-1_1
./mprime -A1 &
and
Code:
#! /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:
Code:
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
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

32×883 Posts
Default

In local.ini there is a line like this:

Pid=10563

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
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default

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
hc_grove
 
Oct 2004

2 Posts
Default

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
Reply

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 02:28.

Thu Jan 28 02:28:11 UTC 2021 up 55 days, 22:39, 0 users, load averages: 3.26, 2.71, 2.59

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.