Running O-FOAM on a server
Dear All,
I am running O-FOAM on a server and I need to launch a series of commands. Hence I created a file called launch.sh which should have allowed me to run all the commands. The file looks like this: Code:
#!/bin/bash Code:
cd 55Deg/ Thanks for help, Samuele |
How did you run the script? If you didn't explicitly set it to run in the background without hang-up, it will terminate when you disconnect.
|
That's probably what I have missed.
I simply run sh launch.sh. What should I do, then? |
|
Ironically, I also found an old post of yours with the question and later the answer:
http://www.cfd-online.com/Forums/ope...tml#post375590 |
Yeah, you're right.
But that thread didn't offer me the solution. I can't und what I am missing. Probabily it's better to start from the / folder, when I give the cd command in the launch.sh file. |
Code:
nohup launch.sh > out.log & |
You could try running via the "screen" command. If you are on the server, just execute "screen". This will open a new session on the server. After starting the job, you can "detach" the screen with a command to be looked up ;-) and afterwards reattach via "screen -r".
After having detached from the screen you can logout from the server without shutting down that run. When returning to the server, reattach as described. Important: If the server has several nodes, most probably you will have to login to the same node again for "screen -r" to work properly! So note down the server number (and the screen number) before leaving for the night/lunch/coffee/etc. ;-) |
+1 to screen.
Or you can set up a scheduler like SGE and launch different jobs, one for each case. this will avoid the need to create a custom script every time and will automatically set lauch the job when the previous one is completed. but on a single machine i'm not shure how much it is worth the hassle, it is usually used on clusers... |
All times are GMT -4. The time now is 11:24. |