Problem running matlab script to background
3 次查看(过去 30 天)
显示 更早的评论
Hello, I made a script to create some map plots using functions like contourfm and quiverm. I run this script on a server and putting it to background like this:
matlab -nosplash -nodisplay -nodesktop < (name.of.script.m) > output.log &
Then I can successfuly logout the machine and the job continues until an error occurs stating: "Segmentation fault (core dumped)" leading to no results.
If I try without -nodisplay switch, no Segmentation fault appears, results are generated but I cann't logout without killing the job at the same time...
Any ideas would be helpful! Thank you in advance!
1 个评论
Alessandro
2013-10-11
Dear Aristotelis, look at this guide, I had the same issue and now everything works fine ;)
I hope it will be helpful :)
Ale
采纳的回答
Konrad Malkowski
2013-3-12
What type of image are you trying to save?
Saving to jpg, png, tiff or eps/ps is usually safer than other file formats when no desktop is present.
You could try using a different rendering method. I would recommend painters or zbuffer.
As for the second part of the question. What happens when you add "exit" as the last command in the script?
更多回答(1 个)
Walter Roberson
2013-3-12
Are you using OS-X or Linux? If so,
nohup matlab -nosplash -nodisplay -nodesktop -r 'try; ScriptName; catch; end; quit' > output.log &
where ScriptName does not have the .m
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!