Matlab use cases
https://docs.rc.uab.edu/
Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.
As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.
Thank you,
The Research Computing Team
Some use cases describing how to offload MATLAB computation tot he cluster.
Use MATLAB on a compute node via VNC
This entails running a MATLAB client (GUI) via VNC on a compute node on Cheaha.
This is a typical use case in the following scenarios
- Computation needs to be offloaded to a compute node on the cluster to free the user's desktop for development
- Computation is too large to be performed on the user's desktop and needs more resources
The vnc session needs to be setup in two stages" 1. Login to cheaha using terminal
$ ssh USERID@cheaha.uabgrid.uab.edu
2. Start VNC server on Cheaha
$ vncserver New 'cheaha.uabgrid.uab.edu:6 (USERID)' desktop is cheaha.uabgrid.uab.edu:6
Cheaha will start the vncserver with an available port number. In the above case ":6"
3. Open a new terminal window on the user desktop and connect using port forwarding using the following
$ ssh -L port:localhost:port USERID@cheaha.uabgrid.uab.edu
where the port number specified in the above command is obtained from
port = 5900 + port number on which the vncserver is running
In the above case
port =5900 + 6 = 5900
The command to connect becomes
$ ssh -L 5906:localhost:5906 USERID@cheaha.uabgrid.uab.edu
Next connect to the vnc server on the Cheaha On the MAC start finder, then cmd+k will bring up the "connect to server" window. (Please make sure You have "screen sharing" turned ON in system preferences. Input the server address as
vnc://localhost:port
In the above case
vnc://localhost:5906
and click Connect. It will open a vnc window with a terminal on the cheaha.
To portforward and login to a compute node use the following command from the terminal in the vnc session
$ qlogin -l vf=memory,h_rt=hr:min:sec
Load the mathworks module and start matlab
$ module load mathworks/R2011b $ matlab
MATLAB will now start interactively in the VNC session and is running ont he compute node on Cheaha.