rhaynes Posted March 13, 2005 Report Share Posted March 13, 2005 Hi, I have a f77 program that I want to run. I log into my workstation from home via ssh and run the executable by ./a.out > runspecs & the job then begins to run but when I log out and log back in the job has died (yes I have tried running the job at the terminal and all is fine...). the file redirection captures output that is normally printed to the screen. Any ideas? I am running mandrake 10.0 official kernel 2.6.3-7 Thanks, R Haynes Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted March 13, 2005 Report Share Posted March 13, 2005 Try making a very simple F77 program that has no complexity, maybe opens a file, writes a date/time stamp, closes the file over and over until the process quits. Then see if your logout interupts this or not. If not, it tells you something specific to your first program, if not, its something else. May have to work on the process of elimination in this kind of problem. How about if you run it as root? Does it interrupt if you log out? Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted March 13, 2005 Report Share Posted March 13, 2005 Also, now that I'm thinking about it, your ID is a process. you login and are a process. So if you create a process that runs under your process, then you are killing your top process when you log out. Why should your subprocess continue to run? Not because its in the background (still under your login process). I'm not 100% about this though.. is there a process you can attach this F77 process too to keep it running (a daemon)? I'm not really savvy here, anyone have any ideas? Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted March 13, 2005 Report Share Posted March 13, 2005 Install screen on the workstation. Then ssh into workstation start screen start your batch job hit Ctrl-a d logout of ssh Your job will contnue to run. More about screen here: http://mandrakeusers.org/index.php?showtopic=23247 Quote Link to comment Share on other sites More sharing options...
rhaynes Posted March 13, 2005 Author Report Share Posted March 13, 2005 Hi, thanks for the reply... if I ssh in and then su to root and run the job, logout out as root, log out as normal user and then log back in the job is still running!!! Any thoughts? R Haynes Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted March 13, 2005 Report Share Posted March 13, 2005 I have no idea how it keeps running doing it that way, but your regular user can run it using screen. Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted March 14, 2005 Report Share Posted March 14, 2005 It may be that root is a process that is already running when you log in as root.. Steve, thanks for the info on screen.. Quote Link to comment Share on other sites More sharing options...
Gowator Posted March 14, 2005 Report Share Posted March 14, 2005 Also, now that I'm thinking about it, your ID is a process. you login and are a process. So if you create a process that runs under your process, then you are killing your top process when you log out. Why should your subprocess continue to run? Not because its in the background (still under your login process). I'm not 100% about this though.. is there a process you can attach this F77 process too to keep it running (a daemon)? I'm not really savvy here, anyone have any ideas? <{POST_SNAPBACK}> Yep you need to make the process owned by a process which doesn't belong to a GUI process. steve demionstrates the easy way to do this.... Quote Link to comment Share on other sites More sharing options...
Qchem Posted March 14, 2005 Report Share Posted March 14, 2005 Have you tried starting the job with nohup? So: nohup ./a.out > runspecs & Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.