script stops running after closing connection to remote computer

Hi,
My Matlab script stops running whenever I disconnect from the remote machine that I'm running the script on. When I re-open the remote connection, Matlab starts running again.
I'm running Matlab 2019a on a MacPro running Windows 10. I log into the MacPro using Microsoft Remote Desktop.
Any ideas on how to troubleshoot or solve this problem?
Thanks, in advance!

댓글 수: 1

Are you connecting to a server, or are you connecting to a desktop machine that has its own display?
What you describe would not surprise me if you are connecting to a server, as the graphics needs to go somewhere.

댓글을 달려면 로그인하십시오.

답변 (2개)

James
James 2019년 7월 30일

0 개 추천

This is a desktop machine being used as a server. I'm surprised that I'm having this issue; I've run scripts on it for years with out running into this problem.
One recent change was to hook up a monitor to it. I tried removing the monitor, but I still see the same issue.

댓글 수: 1

Did you happen to restart MATLAB (and possibly reboot) since the time you removed the monitor ?

댓글을 달려면 로그인하십시오.

James
James 2019년 8월 1일

0 개 추천

Good point. Rebooting didn't resolve the problem after removing the monitor.
This is defintely graphics related, as you suggested. Commenting out plots allowed the script to run without my being logged into the server.
Is there a way to save plots to file without displaying them? This might solve the problem and would let me look at the results.

댓글 수: 1

If you happen to have the parallel computing toolbox, then parfeval or use other parallel computing tools to run the code in a worker. The workers will not have access to the display and will not expect access. You can savefig or saveas or print() inside the worker and later load the file elsewhere.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

태그

질문:

2019년 7월 30일

댓글:

2019년 8월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by