poster
2019-12-10, 20:41
我正在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
现在可以了
回答:
在UNIX上使用nohup (http://en.wikipedia.org/wiki/Nohup)命令可防止注销时MATLAB停止。
nohup matlab -nodisplay -nosplash -r matlab_command > outfile.txt & 而且不要忘了包含exit;在matlab_command脚本的末尾。
更新:
尝试以下解决方案: 是否可以在UNIX下在后台运行MATLAB? (http://www.mathworks.com/support/solutions/en/data/1-15F5B/index.html)
有一种解释这里 (http://www.mathworks.com/support/solutions/en/data/1-43HA6J/index.html) 。
更多&回答... (https://stackoverflow.com/questions/3000724)
谢谢,迈克
为了澄清起见,这是不起作用的命令的顺序
ssh server
matlab -r matlab_command > outfile.txt &
jobs
[1]已停止
为了解决这个问题
fg
^ z
bg
logout
现在可以了
回答:
在UNIX上使用nohup (http://en.wikipedia.org/wiki/Nohup)命令可防止注销时MATLAB停止。
nohup matlab -nodisplay -nosplash -r matlab_command > outfile.txt & 而且不要忘了包含exit;在matlab_command脚本的末尾。
更新:
尝试以下解决方案: 是否可以在UNIX下在后台运行MATLAB? (http://www.mathworks.com/support/solutions/en/data/1-15F5B/index.html)
有一种解释这里 (http://www.mathworks.com/support/solutions/en/data/1-43HA6J/index.html) 。
更多&回答... (https://stackoverflow.com/questions/3000724)