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
MATLAB supports the following processors: Any Intel or AMD x86-64 processor. AVX2 instruction set support is recommended. With Polyspace, 4 cores is recommended.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With