Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have access to some Linux Workstations on which I run my C++ executable files from my Laptop but the problem is that each time I run a job from the terminal in my laptop I have to keep a terminal window for each job ... I need a way to submit the job to the Linux machine and see the result once only after the execution finishes ... I know that this can be done in FORTRAN executable by adding & at the end only and I tried it with: mpirun -np 20 ./a 200 1000000& and mpirun -np 20 ./a 200 1000000 & but non of them is working ...

Is there anyway to do the same in Linux ??

share|improve this question
add comment

3 Answers

How about using the screen command?

share|improve this answer
add comment

Use tmux or the older screen to maintain a terminal session on the remote server, to which you can attach and detach at will. Check the documentation for each command for specifics.

share|improve this answer
add comment

as other have said you can run them in screen or tmux. You can also look at nohup

  nohup mpirun -np 20 ./a 200 1000000 &  > output.log 2>&1   

Since without something like nohup you cannot exit the sessions with jobs running in the background, or they will stop running when the Shell sends a HUP signal.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.