![]() Use screen for an interactive workflow: log in, start math in interactive mode, disconnect because your internet connections is interrupted (or you need to go for lunch), return later to continue the interactive session. Use nohup if your workflow is non-interactive: log in, start a batch job that writes results to a file, log out, log back in the next day to retrieve results. It's not completely clear from your question whether the better solution is this, or nohup (see Stefan's answer). Take a look at the many tutorials available. You can use GNU screen to make a sort of persistent terminal that allows you to resume work wherever you left off. (A toy test example is Table], ], which takes about 30 seconds on the terminal.) ![]() Since the jobs start fine - including those ending with the & symbol to force the job to the background - I do not think that I am having the same "background job suspension" problem as in this question.ĭo you have any thoughts on how I can prevent the terminal from terminating jobs when I logout or my connection is briefly interrupted? The nohup method above works for me with other programs, but for some reason not with Mathematica. The situation is the same regardless of whether my job is a single kernel job or a parallel, multikernel job. These commands all start the Mathematica job fine, but when I logout and log back in to the terminal, no MathKernel or similar processes are running (as verified by ps and by ps -u myusername). I use nohup with any of the following commands: nohup math < test.txt To prevent this termination upon logout, I have tried using the standard Linux program nohup, which is a command telling the terminal to ignore the HUP (hangup) signal output is redirected to a file nohup.out. ![]() When I log back in the terminal, no Mathematica processes (i.e., MathKernel) are running. However, when I log out of the terminal - or even when a brief loss of internet connection interrupts my connection to the remote cluster - the Mathematica script is terminated. I write Mathematica code in a text file (e.g., test.txt) and pass it to math using either the command math < test.txtīoth of these methods work fine for starting a Mathematica job. For example, when I type the command mathematica, I get this error message: Can't open display "".) I am running Mathematica on a remote Linux cluster, by the terminal, using the math command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |