View previous topic :: View next topic |
Author |
Message |
odeSolver Tux's lil' helper
Joined: 11 Jul 2010 Posts: 84 Location: NJ, USA
|
Posted: Thu Jun 06, 2013 3:37 pm Post subject: Help with screen's Ctrl-a d |
|
|
Hello. I (somehow) created a long running MPI program to be run on a Gentoo cluster. I access the cluster using ssh in Cygwin from the fine (*sarcasm*) OS called Windows. My ISP doesn't seem to be able to maintain the consistent connection for the days (maybe weeks) that the program needs to run (besides, I want to watch the new Arrested Development while I wait), so I'm trying to use screen to detach the terminal and let it run in the background. However, when I am in a screen and executing my program, Ctrl-a d doesn't work. Ctrl-a d does work when I am in a screen at the command prompt, but not when executing the program. Any clues as to why I can't get screen's Ctrl-a commands to work when a program is running? (Please speak slowly, I'm a beginner.)
Here is a (slightly edited) version of what my screen looks like when I try (My prompt displays $STY which tells me what screen I'm in):
Code: | ()> screen -S testscreen
(testscreen)> mpirun -machinefile $HOME/utils/Host_file -np 4 myprog 6 0
PID 4510 executing on node7.
PID 29130 executing on node8.
PID 2216 executing on node9.
PID 2777 executing on node6.
Simulating 64x64 oscillators for 9999999 timesteps
Number of PEs = 4
t = 00000. Overwriting files: /raid/fpuData/N=064x064_Beta=0.00_t=0000000_T.csv, /raid/fpuData/N=064x064_Beta=0.00_t=0000000_U.csv
^A |
See the ^A at the end, that's where I tried to hit Ctrl-a d. But nothing happened.
Also, note that I need to run the program so that I can see all the standard output and error output. I tried running in the background as
Code: | >mpirun -machinefile $HOME/utils/Host_file -np 4 myprog 6 0 >myprog.log 2>&1 & |
but the myprog.log was buffered and so when my program slowed (and possibly hung), I could not get all the output. If it's possible to run in the background and ensure the standard output and standard error files are not buffered, I can use that in addition to screen.
Thanks. _________________ Depserately needs help learning Gentoo Linux in order to use a 32-node cluster for my master's thesis in mathematics. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Jun 06, 2013 8:00 pm Post subject: |
|
|
Do you also have the Ctrl-a problem if you use PuTTY on your Windows computer to connect to the cluster?
Do you have access to the cluster? Do you have the Ctrl-a problem if you start screen and mpirun directly on a console of the cluster? |
|
Back to top |
|
|
odeSolver Tux's lil' helper
Joined: 11 Jul 2010 Posts: 84 Location: NJ, USA
|
Posted: Thu Jun 06, 2013 8:13 pm Post subject: |
|
|
bug_report wrote: | Do you also have the Ctrl-a problem if you use PuTTY on your Windows computer to connect to the cluster?
Do you have access to the cluster? Do you have the Ctrl-a problem if you start screen and mpirun directly on a console of the cluster? |
Yes, I have the same Ctrl-a problem if I use PuTTy. I do not have direct access to the cluster. In fact, my only access is through my PC. _________________ Depserately needs help learning Gentoo Linux in order to use a 32-node cluster for my master's thesis in mathematics. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Jun 06, 2013 8:20 pm Post subject: |
|
|
You could always log in a second session and issuewhich should detach screen in the first session.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
odeSolver Tux's lil' helper
Joined: 11 Jul 2010 Posts: 84 Location: NJ, USA
|
Posted: Thu Jun 06, 2013 9:02 pm Post subject: |
|
|
John R. Graham wrote: | You could always log in a second session and issuewhich should detach screen in the first session.
- John |
Perfect backup.
I guess maybe a closer reading of the documentation I might have figured that out. How embarrassing.
Thanks. _________________ Depserately needs help learning Gentoo Linux in order to use a 32-node cluster for my master's thesis in mathematics. |
|
Back to top |
|
|
|