Run Matlab on Sun/Linux Remotely-snippet

From CISSTwiki

Jump to: navigation, search


Contents

Keywords

Matlab, Remote, Sun, Linux, Interactive, Non-interactive

Description

I don't have much experience in Linux stuff, and this is basically the draft of what I did for my case. But it worked perfectly.

The Goal

You want to run one or multiple matlabs on a remote machine. For example you need to run your simulation on a server and leave it there till done.

You can find everything here on the web as well but not collectively!

Non-interactive mode

In this mode you cannot display anything or output on screen. First, ssh to the machine and then:

nohup matlab -nodisplay -nodesktop -nojvm -nosplash < YourCode.m &

"nohup" keeps it running even when you logout, and "&" makes it run in the background. To check all the processes running:

ps -eo pcpu,uid,pid,user,args

It shows you cpu usage as well. "jobs" only shows you the processes run in that session. The machine I was using does not recognize "top" command, and many others!

Interactive mode from windows

You need to install cygwin on your machine. Make sure to select "openssh" and "x11-base" when installing.

Run Cygwin, type "startx", ssh to the machine from xterm (ssh user@hostname -Y), type "matlab &"


Views
Personal tools