mersenneforum.org Running multiple copies of mprime on Linux
 Register FAQ Search Today's Posts Mark Forums Read

 2004-10-10, 13:33 #1 hc_grove   Oct 2004 2 Posts 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
 2004-10-10, 14:05 #2 Xyzzy     Aug 2002 2·7·13·47 Posts 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?
 2004-10-10, 14:33 #3 geoff     Mar 2003 New Zealand 115710 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.
 2004-10-10, 15:34 #4 hc_grove   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.

 Similar Threads Thread Thread Starter Forum Replies Last Post johnadam74 GMP-ECM 21 2019-10-27 18:04 bgbeuning GPU Computing 52 2016-06-09 05:26 ppo Information & Answers 25 2007-07-30 23:25 linux newbie Software 4 2006-03-21 16:13 Helfire Software 8 2004-01-14 00:09

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

Wed Feb 1 16:17:27 UTC 2023 up 167 days, 13:46, 1 user, load averages: 0.85, 0.92, 0.97