Matlab use cases

From Cheaha
Revision as of 14:02, 8 February 2017 by Tanthony@uab.edu (talk | contribs) (edited pages for sitneractive)
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 use case creates an ordinary Matlab session, just like you would on your desktop, however, instead of running MATLAB you your desktop, you run MATLAB on a compute node of the cluster and access it's GUI via your cluster desktop.

This is useful in situations where your personal desktop or laptop is not powerful enough to run your Matlab code or you simply want to offload a long-running computation so you can free your desktop or laptop for other activities.

Connect to Your Cluster Desktop

The first step is to connect to an existing cluster desktop session via VNC. Please follow the steps for setting up a VNC session to create your cluster desktop and connect to it.

Open a Terminal

The second step is to open a terminal window on your cluster desktop. Once you are connected to your cluster desktop, start the Terminal application from the cluster desktop menu Applications->Accessories->Terminal.

Reserve your Computer

The third step is to request a computer on which you can run Matlab. In your cluster desktop terminal window, submit a resource request to reserve a compute node for running Matlab

sinteractive --ntasks=1 --mem-per-cpu=1024 --time=4:00:00 --partition=medium

The above resource request asks for a computer with 1 gigabyte of RAM for 4 hours. You can adjust these values to suit your needs but you should try to make reasonable estimates to ensure that resources are shared fairly. WARNING: the specified time limit is a hard boundary and can't be changed after you start Matlab. When this time limit is reached, your Matlab session will be automatically stopped, without warning, by the cluster resource manager.

sinteractive --ntasks=4 --mem-per-cpu=1024 --time=14:00:00 --partition=medium

The above resource request asks for a computer with 4 cores and 1 gigabyte of RAM/core (total 4GB ram) for 4 hours.

Start Matlab

The fourth and final step is to start Matlab on the compute resource you have reserved. In the same terminal window from which you made the resource request (ie. ran "qlogin"), run the following commands to start matlab.

module load rc/matlab/R2016b 
matlab

Matlab will be running your reserved compute resource and can be controlled interactively via the VNC session. This Matlab session works just like the Matlab sessions on your personal desktop or laptop. When you are finished using Matlab, simply exit the application as you normally would. Your compute resource will automatically return to the resource pool at the end of the your requested reservation time or you can type "exit" to return it immediately.

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