Matlab use cases

From Cheaha
Jump to navigation Jump to search


Attention: Research Computing Documentation has Moved
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 to the 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

  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" 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.


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