Using remote matlab on a cluster: Lost connection but job keeps calculating. How to reopen matlab gui?
6 次查看(过去 30 天)
显示 更早的评论
Just lost connection while a script on matlab was running remotely on a linux cluster. I was running it from the remote matlab GUI just like I would do locally. Suddently I lost connection and that window closed, but reconnecting again to the cluster I can see the script keeps running with "top" command. Is there any way to reopen the matlab GUI just where I left it and keep seeing progress on the console?
3 个评论
Bjorn Gustavsson
2020-6-4
For future work, I suggest you start running matlab either with vnc-server-viewer (for the full gui-experience) or simply through screen running in an x-term. Those methods work well for interuption-sensitive connections.
Good luck this time!
采纳的回答
Jason Ross
2020-6-4
The short answer: you can't get it back. It sounds like it's using X forwarding to send the GUI from the remote machine to your local machine.
As Bjorn Gustavsson says, if you are on a connection that has a high chance of dropping out or being ended somehow, you need to keep the display at the remote end if you want to keep this workflow. For Linux that means VNC (or something very much like it) if you want the GUI, or something like screen (or tmux) if you just want it in the terminal session.
Other approaches that may work:
- Use one of the support packages / add-ins for the different cluster types we integrate with, installed on your local machine. This assumes that your cluster admins have means of supporting this, and a bunch of other things. Most importantly it moves the network connection out of the "job" of updating display -- only the submit/status/data comes back over the wire. As I mentioned earlier, this assumes a number of things about your environment, setup, etc. So it may not be workable for you.
- Instead of running an interactive job from the console, submit jobs using the batch command. This will submit a job to the cluster whose results you can retrieve later. If you lose connection to the cluster you can reconnect/restart and then find the job and check the results.
2 个评论
Jason Ross
2020-6-4
You might ask the cluster admins what their recommended approaches are, I can imagine this is a relatively common question they get -- X forwarding has been around a long time (and I remember thinking how cool it was the first time I saw it) but it has a number of deficiencies like the one you saw. There are plenty of solutions that have been developed in the meantime, it's just a question of what your admins support/recommend.
更多回答(0 个)
另请参阅
类别
在 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!