在后台运行MATLAB [英] Running matlab in the background

查看:1037
本文介绍了在后台运行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 ?

有一个解释这里

这篇关于在后台运行MATLAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆