mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2011-06-29, 13:32   #1
Vincanis
 

156416 Posts
Default mPrime over SSH

I've searched the entire forum and google for running mprime over SSH and got no hits, so I guess I'll go ahead and ask.

I want to test an entire rack of servers with mprime by using the command:

ssh <ip address> /home/mprime/mprime -t

and it works, but only for the first node and then it gets hung up on the response message.
I've also tried having the script from my execution unit run another script that ran mprime on the other nodes but it had the same issues.

(For clarification)
script 1:
ssh <ipaddress> /home/mprime/start-mprime.sh

start-mprime.sh (loaded on the outside nodes)
/home/mprime/mprime -t


Any suggestions out there?
  Reply With Quote
Old 2011-06-29, 16:11   #2
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3×2,083 Posts
Default

I think what you need is to run mprime with "nohup" so it doesn't get terminated when you close the SSH connection. If you run it like this:

ssh <ip address> /home/mprime/mprime -t

mprime will be started in the background on the client represented by <ip address>, and will stay running when you disconnect from SSH. mprime's console output will be redirected to the file stdout.log (or something like that, I'm not completely sure) in whatever working directory your SSH connection first puts you in.
mdettweiler is offline   Reply With Quote
Old 2011-06-29, 16:52   #3
chris2be8
 
chris2be8's Avatar
 
Sep 2009

3·11·59 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
I think what you need is to run mprime with &quot;nohup&quot; so it doesn't get terminated when you close the SSH connection. If you run it like this:

ssh <ip address> /home/mprime/mprime -t

mprime will be started in the background on the client represented by <ip address>, and will stay running when you disconnect from SSH. mprime's console output will be redirected to the file stdout.log (or something like that, I'm not completely sure) in whatever working directory your SSH connection first puts you in.
I think you mean:
ssh <ip address> 'nohup /home/mprime/mprime -t >mprime.out 2>&1 & '

The single quotes round the parms passed to ssh ensure everything inside it is passed to the destination to run there. Without the redirection to mprime.out nohup would write to nohup.out, which is OK unless some other task also tries to write to it.

Your SSH connection will usually put you into your home dir. Try "ssh <ip address> pwd" to check.

You could also try running the whole ssh command under nohup on the source system.

Chris K
chris2be8 is offline   Reply With Quote
Old 2011-06-30, 00:44   #4
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
I think you mean:
ssh <ip address> 'nohup /home/mprime/mprime -t >mprime.out 2>&1 & '

The single quotes round the parms passed to ssh ensure everything inside it is passed to the destination to run there. Without the redirection to mprime.out nohup would write to nohup.out, which is OK unless some other task also tries to write to it.

Your SSH connection will usually put you into your home dir. Try "ssh <ip address> pwd" to check.

You could also try running the whole ssh command under nohup on the source system.

Chris K
Whoops! I rather stupidly left out the actual nohup part in my example, rendering it rather moot. Thanks for correcting me.

Last fiddled with by mdettweiler on 2011-06-30 at 00:45
mdettweiler is offline   Reply With Quote
Old 2011-06-30, 13:36   #5
Vincanis
 

2×31×89 Posts
Default

I actually found a way to use a daemon script over SSH to start mprime. The only problem now is that the few servers running Ubuntu are giving me fits.

I've tried using the daemon script from the Ubuntu forums and it gives me the same issue that I had before (the script hangs after starting the mprime test). Unless I can find a way to get the daemon capabilities from Fedora to Ubuntu I'll end up messing with the script until it finally works.

Thanks for the suggestions.
  Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mprime Unregistered Information & Answers 3 2011-08-05 09:17
./mprime -B in 257 Lazlow PrimeNet 3 2008-10-29 20:40
64 bit mprime? aaronl Linux 1 2005-11-10 16:50
ECM using gmp-ecm and mprime on a P4 geoff Factoring 60 2004-12-02 07:16
Problem with mprime (Fixed with mprime -d) antiroach Software 2 2004-07-19 04:07

All times are UTC. The time now is 06:25.

Thu Dec 3 06:25:56 UTC 2020 up 2:37, 0 users, load averages: 0.75, 1.12, 1.17

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.