mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Information & Answers (https://www.mersenneforum.org/forumdisplay.php?f=38)
-   -   mPrime over SSH (https://www.mersenneforum.org/showthread.php?t=15716)

Vincanis 2011-06-29 13:32

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?

mdettweiler 2011-06-29 16:11

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:

[I]ssh <ip address> /home/mprime/mprime -t[/I]

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.

chris2be8 2011-06-29 16:52

[QUOTE=mdettweiler;264972]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:

[I]ssh <ip address> /home/mprime/mprime -t[/I]

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.[/QUOTE]

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

mdettweiler 2011-06-30 00:44

[QUOTE=chris2be8;264976]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[/QUOTE]
Whoops! :doh!: I rather stupidly left out the actual nohup part in my example, rendering it rather moot. :rolleyes: Thanks for correcting me.

Vincanis 2011-06-30 13:36

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.


All times are UTC. The time now is 22:32.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.