1

I am running an MPI program with SSH secure shell. Due to Wi-Fi disconnection, my la[top looses connection with server and causes failure of running process at server.

As per above suggested solutions, I tried to use "screen -dmSL" command with defining the "workstuff" named with another name and then the command (which is in the form - "./mpirun ......") that I have given to execute the process.

In terminal (in OpenSuse Linux environment) the process I have suspended with "Ctrl-z". It worked well. But when I restarted the SSH Shell after an hour to check either the process completed or not and entered the command "screen -x "...." (workstuff name). I got message as "There is no screen to be attached matching "..." (workstuff name).

I executed the process after entering to sub-folders. So I tried in that way too. But nothing happened.

Was I missed something while giving the command? Plz provide the solution.

I thank you in advance.

3 Answers 3

0

Do you need to see the screen output? If not, simply run the process with an ampersand (&) at the end like so:

./my_process&

If you do need the output, then in most cases you can pipe stdout to a file like this:

./my_process > output.txt&
1
  • Hi. The suggested solutions worked. The only thing I won't understand that while returning back to check the ongoing process, the same command should be given again or the server works just on previously defined condition i.e. "./my_process.... ". And further if I want just close the SSH shell not the process, then does it need any another command?
    – Vishal
    Commented Feb 10, 2014 at 19:23
1

Did you try nohup

nohup ./myprogram > foo.out 2> foo.err < /dev/null &

1
  • I am not sure about nohup. But I have checked the previous comments related to "nohup". At there the most sophisticated solution I found was "screen". So, do u mean the "nohup" will be a better option for particular my problem or it is a common solution for all similar questions? Also it is not clear from above solution that how could I come out of SSH shell (by any further command or just quitting the SSH) and how to return back to process.
    – Vishal
    Commented Feb 10, 2014 at 19:29
1

Look at the -r/-R and -d/-D options on the man page for screen . Running screen -D -RR -x ... (workstuff) works for me when a detached screen is not letting me reattach.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .