MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   在后台运行Matlab (https://www.labfans.com/bbs/showthread.php?t=23518)

poster 2019-12-10 20:41

在后台运行Matlab
 
我正在48个虚拟机上运行matlab,并希望使其自动化。我进入机器,然后使用matlab -r matlab_command > outfile.txt &使进程在后台运行,并在我注销时正常运行。唯一的问题是,当我jobs我的过程停止了,直到我fg ^ z bg才开始。是否有一个matlab标志,以便我可以在不停止的情况下在后台运行它?

谢谢,迈克

为了澄清起见,这是不起作用的命令的顺序

ssh server

matlab -r matlab_command > outfile.txt &

jobs

[1]已停止

为了解决这个问题

fg

^ z

bg

logout

现在可以了



[B]回答:[/B]

在UNIX上使用[URL="http://en.wikipedia.org/wiki/Nohup"]nohup[/URL]命令可防止注销时MATLAB停止。

nohup matlab -nodisplay -nosplash -r matlab_command > outfile.txt & 而且不要忘了包含exit;在matlab_command脚本的末尾。

[B]更新:[/B]

尝试以下解决方案: [URL="http://www.mathworks.com/support/solutions/en/data/1-15F5B/index.html"]是否可以在UNIX下在后台运行MATLAB?[/URL]

有一种解释[URL="http://www.mathworks.com/support/solutions/en/data/1-43HA6J/index.html"]这里[/URL] 。



[url=https://stackoverflow.com/questions/3000724]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 17:56

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.