在后台运行MATLAB
我正在运行的48虚拟机MATLAB和想自动化。我ssh到机器,然后使用 MATLAB -r matlab_command> outfile.txt&安培;
来得到进程在后台运行,并且运行正常,当我退出。唯一的问题是,当我工作
我的进程停止,将无法启动,直到我 FG
^ Z BG
。是否有一个matlab标志,以便我可以在不停止它在后台运行呢?
I am running matlab on 48 virtual machines and would like to automate it. I ssh into the machines then use matlab -r matlab_command > outfile.txt &
to get the process to run in the background and run fine when I logout. The only problem is that when i jobs
my process is stopped and won't start until I fg
^z bg
. Is there a matlab flag so that I can run it in the background without having it stop?
谢谢,
迈克
有关澄清,这是命令的顺序不工作
For clarification this is the order of commands that don't work
SSH服务器
MATLAB -r matlab_command> outfile.txt&安培;
工作
[1]停止
要解决这个问题我
FG
^ Z
BG
注销
和现在的作品
在UNIX上使用 nohup的命令prevent MATLAB用户注销时停止。
Use nohup command on UNIX to prevent MATLAB stop when you logout.
nohup matlab -nodisplay -nosplash -r matlab_command > outfile.txt &
不要忘了包括退出;
在matlab_command脚本结束
And don't forget to include exit;
at the end of matlab_command script.
更新:
尝试这种解决方案:是否可以在UNIX下后台运行MATLAB ?
有一个解释这里。