在背景中运行matlab [英] Running matlab in the background
问题描述
我在48个虚拟机上运行matlab,并希望自动化。我ssh进机器,然后使用 matlab -r matlab_command> outfile.txt&
以使进程在后台运行并在我注销时运行良好。唯一的问题是,当我 jobs
我的进程停止,直到我 fg
^ z bg
。有没有一个MATLAB标志,所以我可以在后台运行它,而不停止?
感谢,
迈克
为了说明这是命令的顺序不起作用
ssh服务器
/ p>
matlab -r matlab_command> outfile.txt&
jobs
[1]已停止
要解决此问题
fg
^ z
bg
登出
现在可以使用> nofollow noreferrer> nohup 命令,以防止在注销时停止MATLAB。
nohup matlab -nodisplay -nosplash -r matlab_command> outfile.txt&
并且不要忘记包括 exit;
尝试此解决方案:可以在UNIX的后台运行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?
Thanks, Mike
For clarification this is the order of commands that don't work
ssh server
matlab -r matlab_command > outfile.txt &
jobs
[1] Stopped
To fix this I
fg
^z
bg
logout
and it now works
Use nohup command on UNIX to prevent MATLAB stop when you logout.
nohup matlab -nodisplay -nosplash -r matlab_command > outfile.txt &
And don't forget to include exit;
at the end of matlab_command script.
UPDATE:
Try this solution: Is it possible to run MATLAB in the background under UNIX?
There is an explanation here.
这篇关于在背景中运行matlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!