Matlab use cases

From UABgrid Documentation
(Difference between revisions)
Jump to: navigation, search
(Use MATLAB on a compute node via VNC)
Line 9: Line 9:
 
# Computation is too large to be performed on the user's desktop and needs more resources
 
# 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"
+
The vnc session needs to be setup in two stages as described in [[Setting_Up_VNC_Session]].
1. Login to cheaha using terminal
+
<pre>
+
$ ssh USERID@cheaha.uabgrid.uab.edu
+
</pre>
+
 
+
2. Start VNC server on Cheaha
+
<pre>
+
$ vncserver
+
New 'cheaha.uabgrid.uab.edu:6 (USERID)' desktop is cheaha.uabgrid.uab.edu:6
+
</pre>
+
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
+
<pre>
+
$ ssh -L port:localhost:port USERID@cheaha.uabgrid.uab.edu
+
</pre>
+
 
+
where the port number specified in the above command is obtained from
+
<pre>  port = 5900 + port number on which the vncserver is running </pre>
+
 
+
In the above case
+
<pre>
+
port =5900 + 6 = 5906 </pre>
+
 
+
The command to connect becomes
+
<pre>
+
$ ssh -L 5906:localhost:5906 USERID@cheaha.uabgrid.uab.edu
+
</pre>
+
 
+
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
+
<pre>vnc://localhost:port </pre>
+
  
In the above case
 
<pre>vnc://localhost:5906 </pre>
 
and click Connect.
 
 
It will open a vnc window with a terminal on the cheaha.
 
It will open a vnc window with a terminal on the cheaha.
  
Line 54: Line 18:
 
</pre>
 
</pre>
  
Load the mathworks module and start matlab
+
Load the mathworks module and start matlab  
<pre>$ module load mathworks/R2011b
+
<pre>$ module load mathworks/R2012a
 
$ matlab
 
$ matlab
 
</pre>
 
</pre>
MATLAB will now start interactively in the VNC session and is running ont he compute node on Cheaha.
+
MATLAB will now start interactively in the VNC session and is running on the compute node on Cheaha.
  
  

Revision as of 12:04, 6 February 2013

Some use cases describing how to offload MATLAB computation to the cluster.

Contents

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

  1. Computation needs to be offloaded to a compute node on the cluster to free the user's desktop for development
  2. 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 as described in Setting_Up_VNC_Session.

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/R2012a 
$ matlab

MATLAB will now start interactively in the VNC session and is running on the compute node on Cheaha.


MATLAB Support / Mailing List

As with any application or computer language, learning to use MATLAB to analyze data or to develop or modify MATLAB applications is an individual responsibility. There is ample application documentation available from the Mathworks website, potential outreach to colleagues who also use MATLAB, and options for consultation with Mathworks. Mathworks also host on-campus training seminars several times a year and provides many on-line learning tutorials.

Installation support for MATLAB at UAB is provided by your local IT support organization and the Docs wiki.

Mathworks Website

Your first and best option for application-specific questions on MATLAB is to refer to the on-line MATLAB documentation. The Mathworks site also provides a a support matrix and an on-line knowledge base.

UAB MATLAB Wiki

The MATLAB page on the Docs wiki is the starting point for installing MATLAB at UAB and, optionally, configuring it to use cluster computing. All users are encouraged to contribute to the MATLAB knowledge in this wiki, especially if you see areas where improvements are needed. Remember, this knowledge base is only as good as the people who contribute to it.

Contributing to the wiki is as easy as clicking the login link on the top-right of the page and signing in with your UAB BlazerID. If you are unsure about making an edit, you can make suggestions for improvement on the page's Discussion tab or discuss the proposed improvement in the MATLAB user group.

UAB MATLAB User Group

At UAB, MATLAB installation support is provided by your local IT support group. Support for application specific questions is available from peers in your research group. We realize that some people are not as familiar with MATLAB as others. For this reason, we have established a MATLAB user forum (mailing list) where users of MATLAB at UAB can help answer each others questions.

This is a network of volunteers sharing their knowledge with peers. You are encouraged to reach out to this community for questions on using MATLAB by

Archives of MATLAB user group discussions are available on-line at https://vo.uabgrid.uab.edu/sympa/arc/matlab-user. You may find your question is already answered in these archives.


UAB MATLAB announce mailing list

To receive information about UAB's MATLAB license and announcements please subscribe to the matlab-annc mailing list by

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox