On Friday 01 March 2002 00:40, Mary K. Conner wrote: > At 05:17 PM 2/28/02 -0500, George Woltman wrote: > >mprime should only raise this error if the pid in the local.ini file and > > the current pid are both running mprime (actually comparing the inode > > values). If there are any Linux experts that can tell me where this test > > is going wrong, I'd appreciate any insights. > > > >This is the first reported failure in 2 years.
I'll have a look at the code & see what I can come up with. > > I mucked about with it a bit, and it does appear that if the process > running under the pid in the local.ini file is not mprime, it will not > raise the error. Comparing inodes, if there is a hard link under two > different names, it would raise the error. I.e. someone does 'ln mprime > ll', runs ll, then tries to run mprime, the inodes will match although > there is no process named 'mprime' running (it is possible to force the > process to be named mprime by overwriting argv[0], at least on some > systems). Someone might do the hard link if they are trying to save space > on installations to run on multiple CPU's, I don't have a multiCPU machine, > so I've never done such an installation. That would be a crude and surely unusual way of economising. un*x gurus normal Good Practise to keep executable binaries and scripts seperate from the data, as opposed to the Windows practise of keeping them all mixed up (which makes it much more awkward to set a proper security policy). I think practically every user setup script on unix-like systems (including linux) adds $HOME/bin to $PATH so the obvious place to store mprime is to create a bin directory in your home directory (if it doesn't already exist) & put the binary executable in there. On a multi-cpu system you can then set up a directory for each CPU. None of these working directories need to, or should, contain a copy of mprime. So long as each instance has its own copy of local.ini, there will be no problem with "Another copy is already running". Of course it is counterproductive to run more instances of mprime than there are processors in the system. (Real processors or virtual processors when running on the new Xeons with hyperthreading? I don't know ... but apparently Windows thinks a dual-processor system has four CPUs ... obviously there is scope for confusion here, especially if you have to rely on what the OS tells you, rather than being able to take off the cover and eyeball the hardware!) Regards Brian Beesley _________________________________________________________________________ Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers
