Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with screen's Ctrl-a d
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
odeSolver
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2010
Posts: 84
Location: NJ, USA

PostPosted: Thu Jun 06, 2013 3:37 pm    Post subject: Help with screen's Ctrl-a d Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Jun 06, 2013 8:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
odeSolver
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2010
Posts: 84
Location: NJ, USA

PostPosted: Thu Jun 06, 2013 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Jun 06, 2013 8:20 pm    Post subject: Reply with quote

You could always log in a second session and issue
Code:
screen -d
which should detach screen in the first session. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
odeSolver
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2010
Posts: 84
Location: NJ, USA

PostPosted: Thu Jun 06, 2013 9:02 pm    Post subject: Reply with quote

John R. Graham wrote:
You could always log in a second session and issue
Code:
screen -d
which should detach screen in the first session. :wink:

- 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum